add accessibility section for CSS Custom Highlight API - #43469
Conversation
Documents the intended behavior of the API's `type` attribute for assistive technologies, and notes current limitations and inconsistent support across browsers.
|
Preview URLs (5 pages)
External URLs (5)URL: URL:
(comment last updated: 2026-08-12 23:07:22) |
|
@chrisdavidmills I'd be happy to review this but I'm not sure if this section is in the correct place. What's the standard practice for documenting a11y in APIs with CSS? |
This is interesting. "Accessibility" sections are well-established in the HTML and CSS sections, but I don't think I've ever worked on one in the API section before. Grepping around the site, I can see 4 such sections in existence:
We probably ought to add these sections to the API templates at some point. I think the heading should always be "Accessibility", for consistency. In terms of placement:
Again, for consistency. Which is all to say, I think the placement in this case is correct. |
Description
This PR adds an Accessibility section to the CSS Custom Highlight API page.
Summarizes the intended behavior from the specification: the type attribute can be used by user agents to expose semantic meaning (such as spelling or grammar errors) to assistive technologies.
Notes that current support is limited and inconsistent across browsers and platform accessibility APIs.
Provides guidance for developers: custom highlights should not be relied on alone to convey important information; semantic HTML elements like
<mark>or additional accessible cues should be used when highlighting conveys meaning.This update ensures that developers are aware of accessibility limitations and helps prevent assumptions about screen reader support.
Fixes #43408