-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui5-li, ui5-list): changes accessibleRole type (#8825)
Changes the type of `accessibleRole` property for both `ui5-li` and `ui5-list`. BREAKING CHANGE: The `accessibleRole` property for both `ui5-li` and `ui5-list` has been updated from a string type to an enum type. Additionally, the new enums `ListItemAccessibleRole` and `ListAccessibleRole` have been introduced for these properties respectively. The available options for the `ui5-li`: `ListItem`- Represents the ARIA role "listitem". (by default) `MenuItem` - Represents the ARIA role "menuitem". `TreeItem ` - Represents the ARIA role "treeitem". `Option ` - Represents the ARIA role "option". `None` - Represents the ARIA role "none". The available options for the `ui5-list`: `List`- Represents the ARIA role "list". (by default) `Menu` - Represents the ARIA role "menu". `Tree` - Represents the ARIA role "tree". `ListBox` - Represents the ARIA role "listbox". If you have previously used: ```html <ui5-li accessible-role="menuitem"> List Item</ui5-li> <ui5-list accessible-role="tree"> List </ui5-list> ``` Now use: ```html <ui5-li accessible-role="MenuItem"> List Item</ui5-li> <ui5-list accessible-role="Tree"> List </ui5-list> ``` Related to #8461, #7887
- Loading branch information
1 parent
de67ab6
commit 8235159
Showing
9 changed files
with
101 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* List accessible roles. | ||
* @public | ||
* @since 2.0.0 | ||
*/ | ||
enum ListAccessibleRole { | ||
|
||
/** | ||
* Represents the ARIA role "list". (by default) | ||
* @public | ||
*/ | ||
List = "List", | ||
|
||
/** | ||
* Represents the ARIA role "menu". | ||
* @public | ||
*/ | ||
Menu = "Menu", | ||
|
||
/** | ||
* Represents the ARIA role "tree". | ||
* @public | ||
*/ | ||
Tree = "Tree", | ||
|
||
/** | ||
* Represents the ARIA role "listbox". | ||
* @public | ||
*/ | ||
ListBox = "ListBox" | ||
|
||
} | ||
|
||
export default ListAccessibleRole; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* ListItem accessible roles. | ||
* @public | ||
* @since 2.0.0 | ||
*/ | ||
enum ListItemAccessibleRole { | ||
|
||
/** | ||
* Represents the ARIA role "listitem". (by default) | ||
* @public | ||
*/ | ||
ListItem = "ListItem", | ||
|
||
/** | ||
* Represents the ARIA role "menuitem". | ||
* @public | ||
*/ | ||
MenuItem = "MenuItem", | ||
|
||
/** | ||
* Represents the ARIA role "treeitem". | ||
* @public | ||
*/ | ||
TreeItem = "TreeItem", | ||
|
||
/** | ||
* Represents the ARIA role "option". | ||
* @public | ||
*/ | ||
Option = "Option", | ||
|
||
/** | ||
* Represents the ARIA role "none". | ||
* @public | ||
*/ | ||
None = "None" | ||
|
||
} | ||
|
||
export default ListItemAccessibleRole; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters