You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. **Live Regions**: Use `aria-live="polite"` for status updates and `aria-live="assertive"` only for urgent alerts. Always test with screen readers to ensure announcements are clear.
stopPropagation: boolean = true, // ← New parameter (default: true)
1505
+
): (e: React.KeyboardEvent) => void {
1506
+
return (e: React.KeyboardEvent) => {
1507
+
if (e.key==="Enter"||e.key==="") {
1508
+
e.preventDefault();
1509
+
if (stopPropagation) {
1510
+
e.stopPropagation(); // ← Prevents event bubbling
1511
+
}
1512
+
handler(e);
1513
+
}
1514
+
};
1515
+
}
1516
+
```
1517
+
1518
+
**Impact**: All navigation buttons, tabs, and custom button elements now prevent keyboard event bubbling by default. Optional parameter allows disabling if needed (backwards compatible).
0 commit comments