Skip to content

Commit

Permalink
fix(sbb-dialog, sbb-menu, sbb-navigation, sbb-tooltip): fix reading o…
Browse files Browse the repository at this point in the history
…rder for VoiceOver with Safari (#2106)

Beside the main fix for the reading order in Safari with VoiceOver, we removed the role=group from the sbb-dialog and replaced it with a custom announcing logic. Moreover we could remove some existing workarounds and fixed a small bug in high contrast mode of the `sbb-navigation`.

Closes #2015, #1879, #1880

BREAKING CHANGE:
- The property `accessibilityLabel` of the `sbb-navigation` was removed. As replacement, an `aria-label` can now directly be placed on the `sbb-navigation` element.

---------

Co-authored-by: Marco D'Auria <[email protected]>
  • Loading branch information
jeripeierSBB and dauriamarco authored Oct 26, 2023
1 parent 09567a3 commit 6497b18
Show file tree
Hide file tree
Showing 35 changed files with 438 additions and 687 deletions.
20 changes: 6 additions & 14 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ export namespace Components {
*/
"open": () => Promise<void>;
/**
* The element that will trigger the menu dialog. Accepts both a string (id of an element) or an HTML element.
* The element that will trigger the menu overlay. Accepts both a string (id of an element) or an HTML element.
*/
"trigger": string | HTMLElement;
}
Expand Down Expand Up @@ -1150,10 +1150,6 @@ export namespace Components {
* This will be forwarded as aria-label to the close button element.
*/
"accessibilityCloseLabel": string | undefined;
/**
* This will be forwarded as aria-label to the dialog and is read as a title of the navigation.
*/
"accessibilityLabel": string | undefined;
/**
* Closes the navigation.
*/
Expand Down Expand Up @@ -1226,7 +1222,7 @@ export namespace Components {
*/
"accessibilityBackLabel": string | undefined;
/**
* This will be forwarded as aria-label to the dialog and is read as a title of the navigation-section.
* This will be forwarded as aria-label to the nav element and is read as a title of the navigation-section.
*/
"accessibilityLabel": string | undefined;
/**
Expand Down Expand Up @@ -1968,7 +1964,7 @@ export namespace Components {
*/
"openDelay"?: number;
/**
* The element that will trigger the tooltip dialog. Accepts both a string (id of an element) or an HTML element.
* The element that will trigger the tooltip overlay. Accepts both a string (id of an element) or an HTML element.
*/
"trigger": string | HTMLElement;
}
Expand Down Expand Up @@ -3885,7 +3881,7 @@ declare namespace LocalJSX {
*/
"onWill-open"?: (event: SbbMenuCustomEvent<void>) => void;
/**
* The element that will trigger the menu dialog. Accepts both a string (id of an element) or an HTML element.
* The element that will trigger the menu overlay. Accepts both a string (id of an element) or an HTML element.
*/
"trigger"?: string | HTMLElement;
}
Expand Down Expand Up @@ -3950,10 +3946,6 @@ declare namespace LocalJSX {
* This will be forwarded as aria-label to the close button element.
*/
"accessibilityCloseLabel"?: string | undefined;
/**
* This will be forwarded as aria-label to the dialog and is read as a title of the navigation.
*/
"accessibilityLabel"?: string | undefined;
/**
* Whether the animation is enabled.
*/
Expand Down Expand Up @@ -4032,7 +4024,7 @@ declare namespace LocalJSX {
*/
"accessibilityBackLabel"?: string | undefined;
/**
* This will be forwarded as aria-label to the dialog and is read as a title of the navigation-section.
* This will be forwarded as aria-label to the nav element and is read as a title of the navigation-section.
*/
"accessibilityLabel"?: string | undefined;
/**
Expand Down Expand Up @@ -4863,7 +4855,7 @@ declare namespace LocalJSX {
*/
"openDelay"?: number;
/**
* The element that will trigger the tooltip dialog. Accepts both a string (id of an element) or an HTML element.
* The element that will trigger the tooltip overlay. Accepts both a string (id of an element) or an HTML element.
*/
"trigger"?: string | HTMLElement;
}
Expand Down
Loading

0 comments on commit 6497b18

Please sign in to comment.