77/**
88 * Accessibility Object Model reflective aria property name types.
99 */
10- export type ARIAProperty = Exclude < keyof ARIAMixin , 'role' > ;
10+ export type ARIAProperty = keyof ARIAMixin ;
1111
1212/**
1313 * Accessibility Object Model reflective aria properties.
1414 */
1515export const ARIA_PROPERTIES : ARIAProperty [ ] = [
16+ 'role' ,
1617 'ariaAtomic' ,
1718 'ariaAutoComplete' ,
1819 'ariaBusy' ,
@@ -72,7 +73,7 @@ export const ARIA_ATTRIBUTES = ARIA_PROPERTIES.map(ariaPropertyToAttribute);
7273 * @return True if the attribute is an aria attribute, or false if not.
7374 */
7475export function isAriaAttribute ( attribute : string ) : attribute is ARIAAttribute {
75- return attribute . startsWith ( 'aria-' ) ;
76+ return attribute . startsWith ( 'aria-' ) || attribute === 'role' ;
7677}
7778
7879/**
@@ -84,9 +85,7 @@ export function isAriaAttribute(attribute: string): attribute is ARIAAttribute {
8485 * @param property The aria property.
8586 * @return The aria attribute.
8687 */
87- export function ariaPropertyToAttribute < K extends ARIAProperty | 'role' > (
88- property : K ,
89- ) {
88+ export function ariaPropertyToAttribute < K extends ARIAProperty > ( property : K ) {
9089 return (
9190 property
9291 . replace ( 'aria' , 'aria-' )
@@ -101,8 +100,8 @@ type ARIAPropertyToAttribute<K extends string> =
101100 K extends `aria${infer Suffix } Element${infer OptS } `
102101 ? `aria-${Lowercase < Suffix > } `
103102 : K extends `aria${infer Suffix } `
104- ? `aria-${Lowercase < Suffix > } `
105- : K ;
103+ ? `aria-${Lowercase < Suffix > } `
104+ : K ;
106105
107106/**
108107 * An extension of `ARIAMixin` that enforces strict value types for aria
0 commit comments