Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/react-dom-bindings/src/shared/validAriaProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ const ariaProperties = {
'aria-rowindex': 0,
'aria-rowspan': 0,
'aria-setsize': 0,
// ARIA 1.3 Attributes
'aria-braillelabel': 0,
'aria-brailleroledescription': 0,
'aria-colindextext': 0,
'aria-rowindextext': 0,
};

export default ariaProperties;
21 changes: 21 additions & 0 deletions packages/react-dom/src/__tests__/ReactDOMInvalidARIAHook-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,27 @@ describe('ReactDOMInvalidARIAHook', () => {
it('should allow valid aria-* props', async () => {
await mountComponent({'aria-label': 'Bumble bees'});
});

it('should allow new ARIA 1.3 attributes', async () => {
// Test aria-braillelabel
await mountComponent({'aria-braillelabel': 'Braille label text'});

// Test aria-brailleroledescription
await mountComponent({'aria-brailleroledescription': 'Navigation menu'});

// Test aria-colindextext
await mountComponent({'aria-colindextext': 'Column A'});

// Test aria-rowindextext
await mountComponent({'aria-rowindextext': 'Row 1'});

// Test multiple ARIA 1.3 attributes together
await mountComponent({
'aria-braillelabel': 'Braille text',
'aria-colindextext': 'First column',
'aria-rowindextext': 'First row',
});
});
it('should warn for one invalid aria-* prop', async () => {
await mountComponent({'aria-badprop': 'maybe'});
assertConsoleErrorDev([
Expand Down
Loading