Skip to content

Commit

Permalink
ROU-11053: Fixed A11Y issues at the menu when @Mobile and others (#986)
Browse files Browse the repository at this point in the history
* Update Menu.ts

* Update MenuFocusableElems expression

Co-authored-by: José Rio <[email protected]>

* Update Menu.ts

* Add onResize event

* Update Menu.ts

* Update settings.json

* Revamped Menu implementation to improve A11Y

* Turn property into private

* Stop the propagation of the keypressEvent

* Fixed show and hide menu client actions api.

* Prevent to "show" the menu when at wrong context.

* update based on feedback

* Fix issue when screen change.

---------

Co-authored-by: gnbm <[email protected]>
  • Loading branch information
joselrio and gnbm authored Sep 9, 2024
1 parent df7a5eb commit 02bb4fc
Show file tree
Hide file tree
Showing 3 changed files with 415 additions and 187 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"diffEditor.ignoreTrimWhitespace": true,
"files.autoSave": "afterDelay",
"files.autoSave": "off",
"editor.minimap.maxColumn": 170,
"editor.wordWrapColumn": 170,
"editor.formatOnSave": true,
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/OSFramework/OSUI/Pattern/Submenu/Submenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ namespace OSFramework.OSUI.Patterns.Submenu {

// Call methods to close, based ok e.key
private _keypressBalloonCallback(e: KeyboardEvent): void {
e.stopPropagation();

// Close the submenu when pressing Esc
if (e.key === GlobalEnum.Keycodes.Escape && this._isOpen) {
this.close();
Expand Down
Loading

0 comments on commit 02bb4fc

Please sign in to comment.