Skip to content

Add aria-* to HTML attributes index table#44086

Open
TGianella wants to merge 5 commits into
mdn:mainfrom
TGianella:feat/44079-HTML-aria-attributes
Open

Add aria-* to HTML attributes index table#44086
TGianella wants to merge 5 commits into
mdn:mainfrom
TGianella:feat/44079-HTML-aria-attributes

Conversation

@TGianella
Copy link
Copy Markdown
Contributor

Description

Add a new aria-* row to the HTML attributes table. The attribute name link points to https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes. This family of attributes is a bit of an outlier regarding the Element column because members don't all apply to the same set of elements, hence the phrasing "Depends on the specific attribute".

I also struggled to find a good page to link to in the description. Understanding ARIA Basics looked good but it is a learn page and not a reference so it might not be exactly what users are looking for. In the end I went for ARIA Guides even though it's not only related to ARIA attributes.

Motivation

ARIA attributes are HTML attributes so they need to be mentioned in the HTML attributes table.

Additional details

Related issues and pull requests

Closes #44079

@TGianella TGianella requested a review from a team as a code owner May 12, 2026 08:35
@TGianella TGianella requested review from estelle and removed request for a team May 12, 2026 08:35
@github-actions github-actions Bot added the Content:HTML Hypertext Markup Language docs label May 12, 2026
@TGianella TGianella changed the title feat(HTML): add aria-* to attributes index Add aria-* to HTML attributes index table May 12, 2026
@github-actions github-actions Bot added the size/s [PR only] 6-50 LoC changed label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Preview URLs (2 pages)

Flaws (35)

Note! 1 document with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/HTML/Reference/Attributes
Title: HTML attribute reference
Flaw count: 35

  • broken_links:
    • Link /en-US/docs/Web/HTML/Reference/Attributes/alt doesn't resolve
    • Link /en-US/docs/Web/Accessibility/ARIA/ is a redirect
    • Link /en-US/docs/Web/HTML/Reference/Attributes/autoplay doesn't resolve
    • Link /en-US/docs/Web/HTML/Reference/Attributes/cite doesn't resolve
    • Link /en-US/docs/Web/HTML/Reference/Attributes/colspan doesn't resolve
    • and 30 more flaws omitted

(comment last updated: 2026-05-13 09:23:18)

Copy link
Copy Markdown
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

To address the issue, we should also add a mention of ARIA within the HTML gides page. As that page is created by listing a summary of the guides i the HTML directory, we can address the issue by adding a "see also" section and adding a link to ARIA there.

<code><a href="/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes">aria-*</a></code>
</td>
<td>
Depends on the specific attribute
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "All elements" might be better here, because every element can accept at least one aria-* attribute, like aria-atomic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree but isn't it going to cause a bit of confusion as to what the difference is between "All elements" and "Global attribute"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The role attribute is global, and some aria-* attributes are too, but not all. Maybe @dipikabh has thoughts or even a better wording option.

Copy link
Copy Markdown
Contributor Author

@TGianella TGianella May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

role already has a dedicated row in the HTML attributes table so we're only talking about proper aria-* attributes. Your point still stands about not all of them being global.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I committed with "All elements" for the time being since I think it is still better than what I had first written.

Comment thread files/en-us/web/html/reference/attributes/index.md Outdated
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
@estelle estelle requested a review from dipikabh May 12, 2026 09:44
Copy link
Copy Markdown

@russell-aciss russell-aciss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to tell people what "ARIA" is before sending them there? We could maybe change "ARIA Guides" to "Accessibility Guides" or "Accessibility Guides and Attributes".

Comment thread files/en-us/web/html/guides/index.md Outdated
Comment thread files/en-us/web/html/reference/attributes/index.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed

5 participants