// @flow

// See https://www.digitala11y.com/wai-aria-1-1-cheat-sheet/

type AriaRole =
  | 'alert'
  | 'alertdialog'
  | 'application'
  | 'article'
  | 'banner'
  | 'button'
  | 'cell'
  | 'checkbox'
  | 'columnheader'
  | 'combobox'
  | 'command'
  | 'complementary'
  | 'contentinfo'
  | 'definition'
  | 'dialog'
  | 'directory'
  | 'document'
  | 'feed'
  | 'figure'
  | 'form'
  | 'grid'
  | 'gridcell'
  | 'group'
  | 'heading'
  | 'img'
  | 'landmark'
  | 'link'
  | 'list'
  | 'listbox'
  | 'listitem'
  | 'log'
  | 'main'
  | 'marquee'
  | 'math'
  | 'menu'
  | 'menubar'
  | 'menuitem'
  | 'menuitemcheckbox'
  | 'menuitemradio'
  | 'navigation'
  | 'note'
  | 'option'
  | 'presentation'
  | 'progressbar'
  | 'radio'
  | 'radiogroup'
  | 'range'
  | 'region'
  | 'roletype'
  | 'row'
  | 'rowgroup'
  | 'rowheader'
  | 'scrollbar'
  | 'search'
  | 'section'
  | 'sectionhead'
  | 'select'
  | 'separator'
  | 'slider'
  | 'spinbutton'
  | 'status'
  | 'structure'
  | 'tab'
  | 'tablist'
  | 'tabpanel'
  | 'textbox'
  | 'timer'
  | 'toolbar'
  | 'tooltip'
  | 'tree'
  | 'treegrid'
  | 'treeitem'
  | 'widget'
  | 'window'
  | 'none'
  | 'term';

type AriaLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 'none';
type AriaLive = 'off' | 'polite' | 'assertive';
type AriaOrientation = 'horizontal' | 'vertical';
type AriaSort = 'ascending' | 'descending' | 'none' | 'other';

export type AriaProps = {|
  role?: AriaRole,
  'aria-active-descendant'?: string,
  'aria-atomic'?: boolean,
  'aria-autocomplete'?: boolean,
  'aria-busy'?: boolean,
  'aria-checked'?: boolean,
  'aria-controls'?: string,
  'aria-current'?: string,
  'aria-describedby'?: string,
  'aria-disabled'?: boolean,
  'aria-dropeffect'?: boolean,
  'aria-expanded'?: boolean,
  'aria-flowto'?: string,
  'aria-grabbed'?: boolean,
  'aria-haspopup'?: boolean,
  'aria-hidden'?: boolean,
  'aria-invalid'?: string,
  'aria-label'?: string,
  'aria-labelledby'?: string,
  'aria-level'?: AriaLevel,
  'aria-live'?: AriaLive,
  'aria-multiline'?: boolean,
  'aria-multiselectable'?: boolean,
  'aria-orientation'?: AriaOrientation,
  'aria-owns'?: string,
  'aria-posinset'?: number,
  'aria-pressed'?: boolean,
  'aria-readonly'?: boolean,
  'aria-relevant'?: string,
  'aria-required:'?: boolean,
  'aria-selected'?: boolean,
  'aria-setsize'?: number,
  'aria-sort'?: AriaSort,
  'aria-valuemin'?: number,
  'aria-valuemax'?: number,
  'aria-valuenow'?: number,
  'aria-valuetext'?: string,
|};
