Skip to content

Commit c3e82fb

Browse files
d-koppenhagenAndrewKushnir
authored andcommitted
refactor(core): render additional WAI-ARIA 1.3 property bindings as attributes
Support additional ARIA properties from Accessible Rich Internet Applications (WAI-ARIA) version 1.3. | attribute | property | |-----------|----------| | `aria-activedescendant` | `ariaActiveDescendantElement` | | `aria-colindextext` | `ariaColIndexText` | | `aria-controls` | `ariaControlsElements ` | | `aria-describeyby` | `ariaDescribedByElements ` | | `aria-description` | `ariaDescription` | | `aria-details` | `ariaDetailsElements ` | | `aria-errormessage` | `ariaErrorMessageElements ` | | `aria-flowto` | `ariaFlowToElements ` | | `aria-labelledby` | `ariaLabelledByElements ` | | `aria-owns` | `ariaOwnsElements ` | | `aria-rowindextext` | `ariaRowIndexText ` | closes angular#64847
1 parent 24cfd5a commit c3e82fb

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

packages/compiler/src/schema/dom_element_schema_registry.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata, SecurityContext} from '../core';
1010
import {isNgContainer, isNgContent} from '../ml_parser/tags';
1111
import {dashCaseToCamelCase} from '../util';
12-
1312
import {SECURITY_SCHEMA} from './dom_security_schema';
1413
import {ElementSchemaRegistry} from './element_schema_registry';
1514

@@ -75,7 +74,7 @@ const OBJECT = 'object';
7574
// =================================================================================================
7675

7776
export const SCHEMA: string[] = [
78-
'[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +
77+
'[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +
7978
/* added manually to avoid breaking changes */
8079
',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',
8180
'[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',
@@ -272,28 +271,38 @@ export const _ATTR_TO_PROP = new Map(
272271
'readonly': 'readOnly',
273272
'tabindex': 'tabIndex',
274273

275-
// https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
274+
// https://www.w3.org/TR/wai-aria-1.3/#accessibilityroleandproperties-correspondence
275+
'aria-activedescendant': 'ariaActiveDescendantElement',
276276
'aria-atomic': 'ariaAtomic',
277277
'aria-autocomplete': 'ariaAutoComplete',
278278
'aria-busy': 'ariaBusy',
279279
'aria-checked': 'ariaChecked',
280280
'aria-colcount': 'ariaColCount',
281281
'aria-colindex': 'ariaColIndex',
282+
'aria-colindextext': 'ariaColIndexText',
282283
'aria-colspan': 'ariaColSpan',
284+
'aria-controls': 'ariaControlsElements',
283285
'aria-current': 'ariaCurrent',
286+
'aria-describedby': 'ariaDescribedByElements',
287+
'aria-description': 'ariaDescription',
288+
'aria-details': 'ariaDetailsElements',
284289
'aria-disabled': 'ariaDisabled',
290+
'aria-errormessage': 'ariaErrorMessageElements',
285291
'aria-expanded': 'ariaExpanded',
292+
'aria-flowto': 'ariaFlowToElements',
286293
'aria-haspopup': 'ariaHasPopup',
287294
'aria-hidden': 'ariaHidden',
288295
'aria-invalid': 'ariaInvalid',
289296
'aria-keyshortcuts': 'ariaKeyShortcuts',
290297
'aria-label': 'ariaLabel',
298+
'aria-labelledby': 'ariaLabelledByElements',
291299
'aria-level': 'ariaLevel',
292300
'aria-live': 'ariaLive',
293301
'aria-modal': 'ariaModal',
294302
'aria-multiline': 'ariaMultiLine',
295303
'aria-multiselectable': 'ariaMultiSelectable',
296304
'aria-orientation': 'ariaOrientation',
305+
'aria-owns': 'ariaOwnsElements',
297306
'aria-placeholder': 'ariaPlaceholder',
298307
'aria-posinset': 'ariaPosInSet',
299308
'aria-pressed': 'ariaPressed',
@@ -302,6 +311,7 @@ export const _ATTR_TO_PROP = new Map(
302311
'aria-roledescription': 'ariaRoleDescription',
303312
'aria-rowcount': 'ariaRowCount',
304313
'aria-rowindex': 'ariaRowIndex',
314+
'aria-rowindextext': 'ariaRowIndexText',
305315
'aria-rowspan': 'ariaRowSpan',
306316
'aria-selected': 'ariaSelected',
307317
'aria-setsize': 'ariaSetSize',

0 commit comments

Comments
 (0)