fix(web): make the check chip's word reachable
This commit is contained in:
@@ -757,6 +757,9 @@ function mediaStateChip(state: string, wanted: boolean): HTMLSpanElement {
|
||||
if (state === "available") {
|
||||
return chip("", (span) => {
|
||||
span.replaceChildren(icon("check"));
|
||||
// a bare span's aria-label is not reliably exposed; role="img" is what
|
||||
// makes the word reachable once the glyph replaced it
|
||||
span.setAttribute("role", "img");
|
||||
span.setAttribute("aria-label", state);
|
||||
span.dataset.movieState = state;
|
||||
span.dataset.wanted = String(wanted);
|
||||
|
||||
Reference in New Issue
Block a user