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

> ```c++
> enum HighlightType {
>  "highlight",
>  "spellingerror", // Exposed to ATs in the same way as ::spelling-error
>  "grammarerror", // Exposed to ATs in the same way as ::grammar-error
>  "textmatch", // e.g. for custom find-on-page results
> // ...and any others for the common use cases we can think of.
> };
> 
> [Exposed=Window]
> interface Highlight {
>   constructor(AbstractRange... initialRanges);
>   setlike<AbstractRange>;
>   attribute long priority;
>   attribute HighlightType type; // Exposed to ATs. Default is "highlight".
> };
> ```
At the TPAC session, it was mentioned that arbitrary strings would have disadvantages. In lieu of this, I wonder if the generic highlight item in the enum could have a secondary field for color? In education, often a variety of highlight colors are made available and individual instructors and groups use those different colors for different meanings. For example, an instructor might tell a student they need to clarify the sections highlighted in yellow. If the color could be exposed with the information that the content is highlighted, this would allow AT users to participate in these informal meaning assignments.

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


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

Received on Wednesday, 20 October 2021 16:37:02 UTC