Add support for ARIA 1.3 attributes (#34264)

Co-authored-by: Abdulwahab Omira <[email protected]>
Co-authored-by: Sebastian Sebbie Silbermann <[email protected]>
This commit is contained in:
Abdulwahab Omira
2025-08-22 16:22:18 +02:00
committed by GitHub
co-authored by Abdulwahab Omira Sebastian Sebbie Silbermann
parent af7fc7c297
commit cc2e4a24c4
2 changed files with 26 additions and 0 deletions
@@ -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;
@@ -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([