-
Notifications
You must be signed in to change notification settings - Fork 125
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
[html-aam] Make HTML img accname use “title” text if alt is empty #2378
base: main
Are you sure you want to change the base?
Conversation
This change updates the accessible-name computation steps for the img element to require that in the case of an alt="" (empty alt) img element which has non-empty “title” attribute, the value of the “title” attribute is included in computation of the element’s accessible name. Otherwise, without this change, the spec as written doesn’t match the behavior as implemented in existing UAs, nor the corresponding requirements in https://w3c.github.io/accname/#comp_host_language_label in the spec — specifically, the requirement to skip past the “Host Language Label” step in the alt="" case, and to move on to subsequent steps — culminating in the “Tooltip” step, which for HTML elements requires using the value of any “title” attribute, if present. Also, without this change, the spec doesn’t match the expectations in https://wpt.fyi/results/accname/name/comp_tooltip.html for the “img with tooltip label with empty alt” subtest.
✅ Deploy Preview for wai-aria ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
well, this is the opposite outcome that had been decided about 2.5 years ago - w3c/html-aam#322. |
Actually, despite the typo... It seems I suggested this new test in review. Sorry. |
Since the browsers aligned on this variant that conflicts with the HTML-AAM spec, I think we should get UA implementor consensus to remove the WPT test and roll back this change. We'll do it in a way that does not affect the current Interop 2024 Focus Area. We need comments from the following re: willingness to roll it back:
|
no reason to apologize - looking at that wpt PR, you gave me plenty of pings to come review, and i missed every one of them. |
Are we talking about removing the "img with tooltip label with empty alt" test? What change are we considering rolling back? From my perspective, what the browsers are doing now is desirable behavior, which seems to make the |
@nmlapre for mozilla specifically, there would be no rollback, per se, as Firefox was the browser that originally treated a The linked HTML AAM issue has a lot of back and forth on whether or not I think both points of view are valid - and can be beneficial to users - depending on the use cases. (e.g., As an FYI, accessibility checkers such as IBM's a11y assessment tool, ARC Toolkit, the Wave Evaluation tool and the ssa.gov ANDI accessibility checker identify instances of So, if the decision is to keep this new unified behavior - and the spec needs to be adjusted to reflect that, then I'd submit there's also a need to make this update more widely known so that guidance can be updated and so that checkers aren't sending people warnings/alerts about what have become false positives (or change their messaging to point out that authors have provided conflicting information and that something should be done to address that). |
You mean the test at https://wpt.fyi/results/accname/name/comp_tooltip.html that all the UAs are currently passing? If so, I guess I’m confused. Why do we want to remove a test that everybody’s passing?
You mean roll back the https://github.com/w3c/html-aam/pull/322/files change? If so, that’s what the https://github.com/w3c/aria/pull/2378/files patch in this new PR is doing, right? |
This change updates the accessible-name computation steps for the
img
element to require that in the case of analt=""
(emptyalt
)img
element which has a non-emptytitle
attribute, the value of thetitle
attribute is included in computation of the element’s accessible name.Otherwise, without this change, the spec as written doesn’t match the behavior as implemented in existing UAs, nor the corresponding requirements in https://w3c.github.io/accname/#comp_host_language_label in the AccName spec — specifically, the requirement to skip past the “Host Language Label” step in the
alt=""
case, and to move on to subsequent steps, culminating in the “Tooltip” step, which for HTML elements requires using the value of anytitle
attribute, if present.Also, without this change, the spec doesn’t match the expectations in https://wpt.fyi/results/accname/name/comp_tooltip.html for the “img with tooltip label with empty alt” subtest.
Test, Documentation and Implementation tracking