Function aria

  • Description

    This function returns WAI-ARIA attributes for the all html elements.

    Type Parameters

    • T

    Parameters

    Returns {
        helperText: {
            id: string;
        };
        input: {
            aria-activedescendant?: string;
            aria-autocomplete: "list";
            aria-controls: string;
            aria-describedby: string;
            aria-expanded: "true" | "false";
            aria-haspopup: "listbox";
            autocomplete: "off";
            combobox: "off";
            id: string;
            role: "combobox";
            spellcheck: "false";
            tabindex: 0;
        };
        inputLabel: {
            for: string;
            htmlFor: string;
            id: string;
        };
        item: ((item) => {
            aria-disabled: false;
            aria-selected: boolean;
            id: string;
            role: "option";
        });
        itemList: {
            aria-labelledby: string;
            aria-multiselectable: boolean;
            id: string;
            role: "listbox";
            tabindex: -1;
        };
        selectedItem: ((item) => {
            id: string;
            role: string;
            tabindex: number;
        });
        selectedList: {
            aria-activedescendant?: string;
            aria-label: string;
            id: string;
            role: string;
        };
        unselectButton: ((_item) => {
            aria-hidden: "true";
            aria-label: "Unselect";
            role: "button";
            tabindex: -1;
        });
    }

    • helperText: {
          id: string;
      }
      • id: string
    • input: {
          aria-activedescendant?: string;
          aria-autocomplete: "list";
          aria-controls: string;
          aria-describedby: string;
          aria-expanded: "true" | "false";
          aria-haspopup: "listbox";
          autocomplete: "off";
          combobox: "off";
          id: string;
          role: "combobox";
          spellcheck: "false";
          tabindex: 0;
      }
      • Optional Readonly aria-activedescendant?: string
      • Readonly aria-autocomplete: "list"
      • Readonly aria-controls: string
      • Readonly aria-describedby: string
      • Readonly aria-expanded: "true" | "false"
      • Readonly aria-haspopup: "listbox"
      • Readonly autocomplete: "off"
      • Readonly combobox: "off"
      • Readonly id: string
      • Readonly role: "combobox"
      • Readonly spellcheck: "false"
      • Readonly tabindex: 0
    • inputLabel: {
          for: string;
          htmlFor: string;
          id: string;
      }
      • for: string
      • htmlFor: string
      • id: string
    • item: ((item) => {
          aria-disabled: false;
          aria-selected: boolean;
          id: string;
          role: "option";
      })
        • (item): {
              aria-disabled: false;
              aria-selected: boolean;
              id: string;
              role: "option";
          }
        • Parameters

          • item: T

          Returns {
              aria-disabled: false;
              aria-selected: boolean;
              id: string;
              role: "option";
          }

          • Readonly aria-disabled: false
          • Readonly aria-selected: boolean
          • Readonly id: string
          • Readonly role: "option"
    • itemList: {
          aria-labelledby: string;
          aria-multiselectable: boolean;
          id: string;
          role: "listbox";
          tabindex: -1;
      }
      • Readonly aria-labelledby: string
      • Readonly aria-multiselectable: boolean
      • Readonly id: string
      • Readonly role: "listbox"
      • Readonly tabindex: -1
    • selectedItem: ((item) => {
          id: string;
          role: string;
          tabindex: number;
      })
        • (item): {
              id: string;
              role: string;
              tabindex: number;
          }
        • Parameters

          • item: T

          Returns {
              id: string;
              role: string;
              tabindex: number;
          }

          • id: string
          • role: string
          • tabindex: number
    • selectedList: {
          aria-activedescendant?: string;
          aria-label: string;
          id: string;
          role: string;
      }
      • Optional aria-activedescendant?: string
      • aria-label: string
      • id: string
      • role: string
    • unselectButton: ((_item) => {
          aria-hidden: "true";
          aria-label: "Unselect";
          role: "button";
          tabindex: -1;
      })
        • (_item): {
              aria-hidden: "true";
              aria-label: "Unselect";
              role: "button";
              tabindex: -1;
          }
        • Parameters

          • _item: T

          Returns {
              aria-hidden: "true";
              aria-label: "Unselect";
              role: "button";
              tabindex: -1;
          }

          • Readonly aria-hidden: "true"
          • Readonly aria-label: "Unselect"
          • Readonly role: "button"
          • Readonly tabindex: -1

Generated using TypeDoc