-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add "Name from Content" accname step for ::marker pseudo-element #2419
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for wai-aria ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -635,8 +635,12 @@ <h4>Computation steps</h4> | |||
<span id="step2F.ii"><!-- Don't link to this legacy numbered ID. --></span><em>Name From Generated Content:</em> Check for | |||
<abbr title="Cascading Style Sheets">CSS</abbr> generated textual content associated with the <code>current node</code> and include it in the <code>accumulated text</code>. The | |||
<abbr title="Cascading Style Sheets">CSS</abbr> <a href="https://www.w3.org/TR/CSS2/generate.html#before-after-content"><code>::before</code> and <code>::after</code></a> pseudo | |||
elements [[!CSS2]] can provide textual content for [=element|elements=] that have a content model. | |||
elements [[!CSS2]] can provide textual content for [=element|elements=] that have a content model, in addition to [=element|elements=] that support the <a href="https://www.w3.org/TR/css-pseudo-4/#selectordef-marker"><code>::marker</code> pseudo element if it is visually rendered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not opposed to the current wording, but this is how my mind had to translate what was said. just throwing it out as a suggestion as alternate wording.
elements [[!CSS2]] can provide textual content for [=element|elements=] that have a content model, in addition to [=element|elements=] that support the <a href="https://www.w3.org/TR/css-pseudo-4/#selectordef-marker"><code>::marker</code> pseudo element if it is visually rendered. | |
elements [[!CSS2]] can provide textual content for [=element|elements=] that have a content model. The CSS <a href="https://www.w3.org/TR/css-pseudo-4/#selectordef-marker"><code>::marker</code> pseudo element</a> can also provide textual content for [=element|elements=] that support the pseudo element. |
I left out the "if it is visually rendered" bit since that wasn't part of the previous spec text - and it might get confused due to specifically saying "visually rendered" - which is only introduced here in the spec. e.g., opacity: 0;
or scale: 0
would be rendered - but not "visually" since they'd be invisible or shrunk to the size of not being visible. does that mean it wouldn' be included then? (my answer would be no - opacity 0 or scale: 0 should not hide content from the a11y tree)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scottaohara Agreed. My only concern would be for lists, where ::marker
is automatically generated depending on list-style-type
so I'm curious about the scenario where list-style-type: none
visually suppresses the marker (and perhaps list semantics). For ::marker
only (and not other CSS properties like opacity
, scale
), should it be conveyed if it's not visually present?
<ol> | ||
<li id="comp_name_from_content_pseudo_element_marker"> | ||
For <code>::marker</code> pseudo elements, <a class="termref">User agents</a> MUST append <abbr title="Cascading Style Sheets">CSS</abbr> textual content, without a space, | ||
to the textual content of the <code>current node</code> if the <code>::marker</code> is visually rendered and the <code>current node</code> supports <code>::marker</code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just not sure about "visually rendered" here, per my previous comment. but otherwise think this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the visually rendered part is fine, especially since this is related to CSS (which is all about what's visually rendered.
but as i've already mentioned, there are properties in CSS that do not visually render content (in that they are rendered, but not visible), but they are still included in the accName. one can't even make the argument that "well they still take up space in the layout, so that counts as their visual rendering" because |
Thank you @scottaohara @MelSumner. I'm happy to remove the "visually rendered" part. Scott brings up a good point that "visually rendered" isn't existing accname spec language so my only outstanding concern is with treatment of Also, since |
Closes w3c/accname#203
Describe Change Here!
The accname algorithm should account for
::marker
CSS-generated content. This PR for provides spec guidance on ensuring::marker
content (that is visible and where the current node supports it) is included in the accname computation.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.