CSS opacity
property improvements
#31190
Labels
Content:CSS
Cascading Style Sheets docs
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/opacity
What specific section or headline is this issue about?
feedback from #30999
What information was incorrect, unhelpful, or incomplete?
Stuff i would love to see:
Even though
opacity: 0
elements are not visible, they are still part of the DOM. If they are in the tabbing order when invisible, they get focus. We do mention pointer events. But we should tell people to make the content visible when focused.Opacity alone should not be used to provide information to screen readers. Use the hidden attribute or visibility or display style properties. It's best to avoid using aria-hidden attribute, but if hidden with opacity, hide it from screen readers too.
a mention of setting opacity as a value for @starting-style when transitioning from display none to a visible value.
a comment in the stacking context paragraph about how adding opacity can improve perf, with a link to where that's described.
maybe a link to a drag/drop example as opacity is commonly used on items being dragged.
What did you expect to see?
the above
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/css/opacity
The text was updated successfully, but these errors were encountered: