mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 #64847
This commit is contained in:
parent
24cfd5a0ed
commit
c3e82fb2d5
1 changed files with 13 additions and 3 deletions
|
|
@ -9,7 +9,6 @@
|
|||
import {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata, SecurityContext} from '../core';
|
||||
import {isNgContainer, isNgContent} from '../ml_parser/tags';
|
||||
import {dashCaseToCamelCase} from '../util';
|
||||
|
||||
import {SECURITY_SCHEMA} from './dom_security_schema';
|
||||
import {ElementSchemaRegistry} from './element_schema_registry';
|
||||
|
||||
|
|
@ -75,7 +74,7 @@ const OBJECT = 'object';
|
|||
// =================================================================================================
|
||||
|
||||
export const SCHEMA: string[] = [
|
||||
'[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' +
|
||||
'[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' +
|
||||
/* added manually to avoid breaking changes */
|
||||
',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',
|
||||
'[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(
|
|||
'readonly': 'readOnly',
|
||||
'tabindex': 'tabIndex',
|
||||
|
||||
// https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
|
||||
// https://www.w3.org/TR/wai-aria-1.3/#accessibilityroleandproperties-correspondence
|
||||
'aria-activedescendant': 'ariaActiveDescendantElement',
|
||||
'aria-atomic': 'ariaAtomic',
|
||||
'aria-autocomplete': 'ariaAutoComplete',
|
||||
'aria-busy': 'ariaBusy',
|
||||
'aria-checked': 'ariaChecked',
|
||||
'aria-colcount': 'ariaColCount',
|
||||
'aria-colindex': 'ariaColIndex',
|
||||
'aria-colindextext': 'ariaColIndexText',
|
||||
'aria-colspan': 'ariaColSpan',
|
||||
'aria-controls': 'ariaControlsElements',
|
||||
'aria-current': 'ariaCurrent',
|
||||
'aria-describedby': 'ariaDescribedByElements',
|
||||
'aria-description': 'ariaDescription',
|
||||
'aria-details': 'ariaDetailsElements',
|
||||
'aria-disabled': 'ariaDisabled',
|
||||
'aria-errormessage': 'ariaErrorMessageElements',
|
||||
'aria-expanded': 'ariaExpanded',
|
||||
'aria-flowto': 'ariaFlowToElements',
|
||||
'aria-haspopup': 'ariaHasPopup',
|
||||
'aria-hidden': 'ariaHidden',
|
||||
'aria-invalid': 'ariaInvalid',
|
||||
'aria-keyshortcuts': 'ariaKeyShortcuts',
|
||||
'aria-label': 'ariaLabel',
|
||||
'aria-labelledby': 'ariaLabelledByElements',
|
||||
'aria-level': 'ariaLevel',
|
||||
'aria-live': 'ariaLive',
|
||||
'aria-modal': 'ariaModal',
|
||||
'aria-multiline': 'ariaMultiLine',
|
||||
'aria-multiselectable': 'ariaMultiSelectable',
|
||||
'aria-orientation': 'ariaOrientation',
|
||||
'aria-owns': 'ariaOwnsElements',
|
||||
'aria-placeholder': 'ariaPlaceholder',
|
||||
'aria-posinset': 'ariaPosInSet',
|
||||
'aria-pressed': 'ariaPressed',
|
||||
|
|
@ -302,6 +311,7 @@ export const _ATTR_TO_PROP = new Map(
|
|||
'aria-roledescription': 'ariaRoleDescription',
|
||||
'aria-rowcount': 'ariaRowCount',
|
||||
'aria-rowindex': 'ariaRowIndex',
|
||||
'aria-rowindextext': 'ariaRowIndexText',
|
||||
'aria-rowspan': 'ariaRowSpan',
|
||||
'aria-selected': 'ariaSelected',
|
||||
'aria-setsize': 'ariaSetSize',
|
||||
|
|
|
|||
Loading…
Reference in a new issue