Skip to content

feat(aria): Add short titles, format titles for roles#39472

Merged
bsmth merged 6 commits intomdn:mainfrom
bsmth:a11y-parent-pages
May 12, 2025
Merged

feat(aria): Add short titles, format titles for roles#39472
bsmth merged 6 commits intomdn:mainfrom
bsmth:a11y-parent-pages

Conversation

@bsmth
Copy link
Copy Markdown
Member

@bsmth bsmth commented May 9, 2025

Description

In this PR, I'm making the nav consistent for ARIA attributes and roles. That means:

Additions:

  • short-title for attributes and roles

Changes:

  • Update titles for attributes to have same format as roles

For example all role pages:

title: "ARIA: cell role"

become

title: "ARIA: cell role"
+short-title: cell

And all attribute pages:

title: aria-activedescendant

Become:

+title: "ARIA: aria-activedescendant attribute"
+short-title: aria-activedescendant

The same change is repeated through the whole section.

Related issues and pull requests

Follow up from (separated out to reduce noise / complexity of that review):

@bsmth bsmth requested a review from a team as a code owner May 9, 2025 15:02
@bsmth bsmth requested review from scottaohara and removed request for a team May 9, 2025 15:02
@github-actions github-actions bot added Content:Accessibility Accessibility docs size/m [PR only] 51-500 LoC changed labels May 9, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 9, 2025

Preview URLs (140 pages)

@bsmth bsmth requested a review from dipikabh May 9, 2025 15:27
Copy link
Copy Markdown
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

This update makes sense, thanks!

Although, for the title should we use the format "ARIA attribute: attribute-name`" instead?
For that reason, perhaps we'd also want to update the existing "ARIA: role-name role" to "ARIA role: role-name".

We have a similar format we use in HTML titles, like here https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/capture: "HTML attribute: capture".

@bsmth
Copy link
Copy Markdown
Member Author

bsmth commented May 12, 2025

Thank you!

Although, for the title should we use the format "ARIA attribute: attribute-name`" instead?

Good suggestion. Personally, I prefer ARIA: name attribute format like category: name type - this seems more natural to search for. For ARIA things that would be "button role" or "aria-required attribute". I think the same applies to HTML, like "HTML: autocomplete attribute", what do you think?

@bsmth bsmth merged commit a8b2548 into mdn:main May 12, 2025
7 checks passed
@bsmth bsmth deleted the a11y-parent-pages branch May 12, 2025 15:08
wbamberg added a commit to wbamberg/content that referenced this pull request May 21, 2025
* upstream/main: (40 commits)
  Add a guide on xs-leaks (mdn#38977)
  chore: Link to child pages in SVG, URI section (mdn#39470)
  Correct page title for `Uint8Array.prototype.setFromHex()` (mdn#39494)
  Bump markdownlint-cli2 from 0.17.2 to 0.18.0 (mdn#39488)
  Add more documentation for sizes=auto (mdn#39464)
  css(fix): update 'shape()' page (mdn#39454)
  Expand Compression Dictionary format description (mdn#39441)
  Add username/password section to URLs guide (mdn#39487)
  Fix typos (mdn#39481)
  CSS: mask-position property description (mdn#39449)
  Adding @starting-style to CSS nesting at-rules (mdn#39473)
  feat(aria): Add short titles, format titles for roles (mdn#39472)
  Fix Circle Collision detection algorithm (mdn#39484)
  Add warning against using element IDs as global properties. (mdn#39422)
  Fix typos in web audio spatialization basics (mdn#39476)
  More Error Messages (mdn#39419)
  Add links to CSS sidebar (mdn#39445)
  css: add 'stretch' value examples (mdn#39451)
  chore: link to unlinked child pages (mdn#39469)
  Fix typos (mdn#39465)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Accessibility Accessibility docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants