Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address title attribute and name prohibited elements #2292

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Jul 24, 2024

This PR does a few things:

  • Revises naming computation section to
    • identify elements which are name prohibited, reducing these items accName algorithm to only accept names from aria-label/aria-labelledby. Title specifically called out to contribute to description, not name. (see: Update HTML-AAM to use title for description instead of name, when the name is prohibited html-aam#552) - closes Title should not contribute to accName for generic elements html-aam#506
    • revise labelling of a and area element naming, as their href-less versions are name prohibited
    • Fix 'Sectioning and Grouping Elements' to just "Sectioning Elements' (the concept of grouping elements was removed. More changes need to happen here.
    • Removes Text-level elements naming computation section (these largely all became part of the prohibited naming section)
    • Adds new "elements which cannot be named" section (a couple of these were part of the text-level elements section, so they needed a place to go, as simply folding them into name prohibited didn't make sense, to me)
  • addresses marking role=listitem as name prohibited - closes listitem can only be labeled by author and not by content #1712
  • addresses the desire to make sure the title attribute does not produce redundant information (e.g., <div title=foo>foo</div> title should not return a desc. Nor should it for <button title=foo aria-label=foo>...</button> - as the title matches the content of the div, and the accName of the button)

I currently don't have header and footer listed in this update - because I really would rather not put them into the name prohibited category when they aren't banner/contentinfo landmarks, and would really just hope we can get #1931 and updating the non-landmark header and footer elements to the new proposed roles.

Test, Documentation and Implementation tracking

Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.

  • "author MUST" tests:
  • "user agent MUST" tests:
  • Browser implementations (link to issue or commit):
    • WebKit:
    • Gecko:
    • Blink:
  • Does this need AT implementations?
  • Related APG Issue/PR:
  • MDN Issue/PR:

Preview | Diff

This PR does a few things:

which i will list in a bit...
@scottaohara scottaohara changed the title [html-aam] - address title attribute and name prohibited elements [html-aam, ARIA] - address title attribute and name prohibited elements Jul 24, 2024
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit d899202
🔍 Latest deploy log https://app.netlify.com/sites/wai-aria/deploys/66a2708567850e000836eb23
😎 Deploy Preview https://deploy-preview-2292--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

html-aam/index.html Outdated Show resolved Hide resolved
clarify that uas not use the title attribute for a description if the value of the title matches the element's accessible name, or the the content of the element (subtree)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant