Helpers related to universal accessibility


Universal accessibility is a core goal of the Elix project. These helpers are used by mixins like AriaListMixin and AriaMenuMixin to support accessibility via ARIA.


defaultAriaRole constant

A dictionary mapping built-in HTML elements to their default ARIA role.

Example: defaultAriaRole.ol returns "list", since the default ARIA role for an ol (ordered list) element is "list".

ensureId(element) static method

If the given element already has an ID, return it. If not, generate a previously unused ID and return that.


  • element: Element

Returns: string