Re: [csswg-drafts] [css-display] create a display property value for visually hiding an element while making it available for AT (#560)

I originally came here to propose `display: visually-hidden`, and I’m disheartened to see that this idea has been discussed for nearly nine years without significant traction. While there are workarounds to achieve this effect, if we truly prioritize accessibility, there should be a dedicated property/value for this purpose.

|                                    | Hidden from A11y Tree | Visible to A11y Tree |
| --------------------- | ---------------------- | -------------------- |
| **Occupies Space**  | `visibility: hidden;`      | `opacity: 0`              |
| **Collapses Space** |   `display: none`          | `display: visually-hidden` (ideally)  |

Having a standardized way to visually hide content while keeping it available to assistive technologies would reduce reliance on custom CSS utility classes and improve accessibility consistency across the web.

-- 
GitHub Notification of comment by travisvalerius
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/560#issuecomment-2659630578 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 14 February 2025 15:30:21 UTC