Skip to content

Commit

Permalink
Merge pull request #4101 from preactjs/types/wai-aria-1.2
Browse files Browse the repository at this point in the history
types: Ensure all WAI-ARIA 1.2 roles are supported
  • Loading branch information
rschristian committed Aug 16, 2023
2 parents 7cd4833 + 0dd621f commit 21a6f30
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/jsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1587,32 +1587,43 @@ export namespace JSXInternal {
'aria-valuetext'?: Signalish<string | undefined>;
}

// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
// All the WAI-ARIA 1.2 role attribute values from https://www.w3.org/TR/wai-aria-1.2/#role_definitions
type AriaRole =
| 'alert'
| 'alertdialog'
| 'application'
| 'article'
| 'banner'
| 'blockquote'
| 'button'
| 'caption'
| 'cell'
| 'checkbox'
| 'code'
| 'columnheader'
| 'combobox'
| 'command'
| 'complementary'
| 'composite'
| 'contentinfo'
| 'definition'
| 'deletion'
| 'dialog'
| 'directory'
| 'document'
| 'emphasis'
| 'feed'
| 'figure'
| 'form'
| 'generic'
| 'grid'
| 'gridcell'
| 'group'
| 'heading'
| 'img'
| 'input'
| 'insertion'
| 'landmark'
| 'link'
| 'list'
| 'listbox'
Expand All @@ -1621,6 +1632,7 @@ export namespace JSXInternal {
| 'main'
| 'marquee'
| 'math'
| 'meter'
| 'menu'
| 'menubar'
| 'menuitem'
Expand All @@ -1630,34 +1642,47 @@ export namespace JSXInternal {
| 'none'
| 'note'
| 'option'
| 'paragraph'
| 'presentation'
| 'progressbar'
| 'radio'
| 'radiogroup'
| 'range'
| 'region'
| 'roletype'
| 'row'
| 'rowgroup'
| 'rowheader'
| 'scrollbar'
| 'search'
| 'searchbox'
| 'section'
| 'sectionhead'
| 'select'
| 'separator'
| 'slider'
| 'spinbutton'
| 'status'
| 'strong'
| 'structure'
| 'subscript'
| 'superscript'
| 'switch'
| 'tab'
| 'table'
| 'tablist'
| 'tabpanel'
| 'term'
| 'textbox'
| 'time'
| 'timer'
| 'toolbar'
| 'tooltip'
| 'tree'
| 'treegrid'
| 'treeitem'
| 'widget'
| 'window'
| 'none presentation';

export interface HTMLAttributes<RefType extends EventTarget = EventTarget>
Expand Down

0 comments on commit 21a6f30

Please sign in to comment.