|
| 1 | +type ariaProps = { |
| 2 | + /* accessibility */ |
| 3 | + /* https://www.w3.org/TR/wai-aria-1.1/ */ |
| 4 | + /* https://accessibilityresources.org/<aria-tag> is a great resource for these */ |
| 5 | + @as("aria-current") |
| 6 | + ariaCurrent?: [#page | #step | #location | #date | #time | #"true" | #"false"], |
| 7 | + @as("aria-details") |
| 8 | + ariaDetails?: string, |
| 9 | + @as("aria-disabled") |
| 10 | + ariaDisabled?: bool, |
| 11 | + @as("aria-hidden") |
| 12 | + ariaHidden?: bool, |
| 13 | + @as("aria-invalid") ariaInvalid?: [#grammar | #"false" | #spelling | #"true"], |
| 14 | + @as("aria-keyshortcuts") |
| 15 | + ariaKeyshortcuts?: string, |
| 16 | + @as("aria-label") |
| 17 | + ariaLabel?: string, |
| 18 | + @as("aria-roledescription") |
| 19 | + ariaRoledescription?: string, |
| 20 | + /* Widget Attributes */ |
| 21 | + @as("aria-autocomplete") ariaAutocomplete?: [#inline | #list | #both | #none], |
| 22 | + /* https://www.w3.org/TR/wai-aria-1.1/#valuetype_tristate */ |
| 23 | + @as("aria-checked") |
| 24 | + ariaChecked?: [#"true" | #"false" | #mixed], |
| 25 | + @as("aria-expanded") |
| 26 | + ariaExpanded?: bool, |
| 27 | + @as("aria-haspopup") |
| 28 | + ariaHaspopup?: [#menu | #listbox | #tree | #grid | #dialog | #"true" | #"false"], |
| 29 | + @as("aria-level") |
| 30 | + ariaLevel?: int, |
| 31 | + @as("aria-modal") |
| 32 | + ariaModal?: bool, |
| 33 | + @as("aria-multiline") |
| 34 | + ariaMultiline?: bool, |
| 35 | + @as("aria-multiselectable") |
| 36 | + ariaMultiselectable?: bool, |
| 37 | + @as("aria-orientation") ariaOrientation?: [#horizontal | #vertical | #undefined], |
| 38 | + @as("aria-placeholder") |
| 39 | + ariaPlaceholder?: string, |
| 40 | + /* https://www.w3.org/TR/wai-aria-1.1/#valuetype_tristate */ |
| 41 | + @as("aria-pressed") ariaPressed?: [#"true" | #"false" | #mixed], |
| 42 | + @as("aria-readonly") |
| 43 | + ariaReadonly?: bool, |
| 44 | + @as("aria-required") |
| 45 | + ariaRequired?: bool, |
| 46 | + @as("aria-selected") |
| 47 | + ariaSelected?: bool, |
| 48 | + @as("aria-sort") |
| 49 | + ariaSort?: string, |
| 50 | + @as("aria-valuemax") |
| 51 | + ariaValuemax?: float, |
| 52 | + @as("aria-valuemin") |
| 53 | + ariaValuemin?: float, |
| 54 | + @as("aria-valuenow") |
| 55 | + ariaValuenow?: float, |
| 56 | + @as("aria-valuetext") |
| 57 | + ariaValuetext?: string, |
| 58 | + /* Live Region Attributes */ |
| 59 | + @as("aria-atomic") |
| 60 | + ariaAtomic?: bool, |
| 61 | + @as("aria-busy") |
| 62 | + ariaBusy?: bool, |
| 63 | + @as("aria-live") ariaLive?: [#off | #polite | #assertive | #rude], |
| 64 | + @as("aria-relevant") |
| 65 | + ariaRelevant?: string, |
| 66 | + /* Drag-and-Drop Attributes */ |
| 67 | + @as("aria-dropeffect") ariaDropeffect?: [#copy | #move | #link | #execute | #popup | #none], |
| 68 | + @as("aria-grabbed") |
| 69 | + ariaGrabbed?: bool, |
| 70 | + /* Relationship Attributes */ |
| 71 | + @as("aria-activedescendant") |
| 72 | + ariaActivedescendant?: string, |
| 73 | + @as("aria-colcount") |
| 74 | + ariaColcount?: int, |
| 75 | + @as("aria-colindex") |
| 76 | + ariaColindex?: int, |
| 77 | + @as("aria-colspan") |
| 78 | + ariaColspan?: int, |
| 79 | + @as("aria-controls") |
| 80 | + ariaControls?: string, |
| 81 | + @as("aria-describedby") |
| 82 | + ariaDescribedby?: string, |
| 83 | + @as("aria-errormessage") |
| 84 | + ariaErrormessage?: string, |
| 85 | + @as("aria-flowto") |
| 86 | + ariaFlowto?: string, |
| 87 | + @as("aria-labelledby") |
| 88 | + ariaLabelledby?: string, |
| 89 | + @as("aria-owns") |
| 90 | + ariaOwns?: string, |
| 91 | + @as("aria-posinset") |
| 92 | + ariaPosinset?: int, |
| 93 | + @as("aria-rowcount") |
| 94 | + ariaRowcount?: int, |
| 95 | + @as("aria-rowindex") |
| 96 | + ariaRowindex?: int, |
| 97 | + @as("aria-rowspan") |
| 98 | + ariaRowspan?: int, |
| 99 | + @as("aria-setsize") |
| 100 | + ariaSetsize?: int, |
| 101 | +} |
| 102 | + |
1 | 103 | type t_NoId = {
|
| 104 | + // Cannot spread whole dom props since overwriting is not possible. |
| 105 | + ...ariaProps, |
2 | 106 | className?: string,
|
3 | 107 | style?: ReactDOM.Style.t,
|
4 | 108 | ref?: ReactDOM.domRef,
|
|
0 commit comments