WIP accessibility of widgets:

- fixed fallback-order for aria-attributes (done now in connected callback and not updated, which was not reliable in the order called)
- aria-label set by (in order of priority): ariaLabel, label, placeholder, statustext
- aria-description set by (----- " -----): ariaDescription, helpText, statustext (if not already used for -label)
- following widget work now (incl. focus by click on label): et2-textbox, et2-date*, et2-url*, et2-select*
This commit is contained in:
ralf
2024-04-26 12:04:37 +02:00
parent e1d4c61e9d
commit e9d366aa98
3 changed files with 22 additions and 15 deletions

View File

@ -28,7 +28,7 @@ export const ButtonMixin = <T extends Constructor>(superclass : T) => class exte
cancel: /cancel(&|\]|$)/,
delete: /delete(&|\]|$)/,
discard: /discard(&|\]|$)/,
edit: /edit(&|\[\]|$)/,
edit: /edit(&|\[|\]|$)/,
next: /(next|continue)(&|\]|$)/,
finish: /finish(&|\]|$)/,
back: /(back|previous)(&|\]|$)/,
@ -426,4 +426,12 @@ export const ButtonMixin = <T extends Constructor>(superclass : T) => class exte
// array.
return null;
}
/**
* Reimplemented to pass aria-attributes to button
*/
getInputNode()
{
return this.shadowRoot.querySelector('button');
}
}