Skip to content

Commit fa37b7d

Browse files
committed
Warn for ARIA typos on custom elements
Normally we allow any attribute/property on custom elements. However it's a shared namespace. The `aria-` namespace applies to all generic elements which are shared with custom elements. So arguably adding custom extensions there is a really bad idea since it can conflict with future additions. It's possible there is a new standard one that's polyfilled by a custom element but the same issue applies to React in general that we might warn for very new additions so we just have to be quick on that.
1 parent 73deff0 commit fa37b7d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js

-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77

88
import {ATTRIBUTE_NAME_CHAR} from './isAttributeNameSafe';
9-
import isCustomComponent from './isCustomComponent';
109
import validAriaProperties from './validAriaProperties';
1110
import hasOwnProperty from 'shared/hasOwnProperty';
1211

@@ -110,8 +109,5 @@ function warnInvalidARIAProps(type, props) {
110109
}
111110

112111
export function validateProperties(type, props) {
113-
if (isCustomComponent(type, props)) {
114-
return;
115-
}
116112
warnInvalidARIAProps(type, props);
117113
}

0 commit comments

Comments
 (0)