Skip to content

add accessibility section for CSS Custom Highlight API#43469

Open
mohammed-ali-osman wants to merge 1 commit intomdn:mainfrom
mohammed-ali-osman:add-css-api-accessibility
Open

add accessibility section for CSS Custom Highlight API#43469
mohammed-ali-osman wants to merge 1 commit intomdn:mainfrom
mohammed-ali-osman:add-css-api-accessibility

Conversation

@mohammed-ali-osman
Copy link
Contributor

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

Documents the intended behavior of the API's `type` attribute for assistive technologies,
and notes current limitations and inconsistent support across browsers.
@mohammed-ali-osman mohammed-ali-osman requested a review from a team as a code owner March 17, 2026 11:22
@mohammed-ali-osman mohammed-ali-osman requested review from chrisdavidmills and removed request for a team March 17, 2026 11:22
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Mar 17, 2026
@github-actions
Copy link
Contributor

Preview URLs (1 page)

Flaws (1)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/API/CSS_Custom_Highlight_API
Title: CSS Custom Highlight API
Flaw count: 1

  • macros:
    • Macro cssxref produces link /en-US/docs/Web/CSS/pseudo-elements which is a redirect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document accessibility considerations for Custom Highlight API

2 participants