-
Notifications
You must be signed in to change notification settings - Fork 22
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
Consider ignoring pseudo element content for accname if it has explicitly empty alt text #194
Comments
this is interesting... i had never even thought to try adding content alt text to a content string that wasn't either a url or a unicode character. but if one were to do:
then "alt text" would become the exposed content in the a11y tree, while "visible text" would remain rendered on the page. that seems, odd and prone to abuse. |
Yeah 🙁 I guess I could also see people doing things like:
I still think it could potentially be useful to mark certain characters as presentational. For example, if someone wanted to add a hashtag next to headings in a blog (as an additional visual cue for heading permalinks) they could do something like:
then in the CSS:
Would it make sense to only respect the alt text if the alt text is explicitly empty? That would make it so pseudo element content inclusion is similar to what's done in step 2A where hidden nodes are ignored. |
I put in some WPT placeholders for these tests in: and I'm very familiar with the decade of history of alternative text for CSS generated content with |
@cyns volunteered to write tests! :) cyns when you assign yourself to the test issue you can unassign yourself here |
I agree that content: "foo" / ""; Is effectively equivalent to But I want to make sure we're not suggesting emptying the pseudo-element alternative when the optional alt fallback is not specified, like this: content: "foo"; the pseudo element's label here should remain "foo" not "". |
Here's the issue, but I don't think @cyns is assignable... Did you check your team invitation? |
Yeah, that was what I meant to say. I'll change the title to mention "explicitly empty alt text" rather than just "empty alt text" to make it more clear. |
@cookiecrook this still has f2fcandidate on it, is there more on this to discuss at TPAC in sept? |
Sorry I forgot about this one, but I have started writing the tests in: I'd suggest this issue is overcome by the first one of these new issues? |
I agree, let's close this in favor of the more general issue 🙂 |
In step 2F.ii, it says that browsers should:
However, we also have the option of setting alt text for the CSS content. Maybe I'm misunderstanding something, but I think it would be nice if CSS content with empty alt text was ignored altogether when computing the accessible name.
The text was updated successfully, but these errors were encountered: