Re: [csswg-drafts] [css-highlight-api] Figure out how highlights are exposed to the accessibility tree (#6498)

> 
> 
> > I wonder if the generic highlight item in the enum could have a secondary field for color?
> 
> @SuzanneTaylor If the highlight range is being used to change the text color or background color of a range of text, the author will have had to include a rule for that in the `::highlight()` pseudo-element selector that the highlight is using. So if we want to include color in the information given to ATs about highlights, I think we could just reuse that style information. Allowing color to be specified separately on the `Highlight` interface could result in confusion if the color is changed in the CSS and the value on the interface becomes out-of-sync with the value in the `::highlight()` pseudo.

That makes sense, but how will colors specified as numbers become human-friendly words? With contrast requirements already restricting color choices for the highlights, background and text colors, I don't think being limited to the named colors will work well.

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


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

Received on Thursday, 21 October 2021 23:29:44 UTC