Hello SmartGWT Team,
I am currently reviewing keyboard accessibility in our SmartGWT application with ScreenReader mode enabled (SC.setScreenReaderMode(true)) and had a few questions regarding pop-up windows and window controls.
-
Pop-up window focus
In some cases, when a pop-up window opens, keyboard focus does not automatically move into the dialog. As a result, keyboard users or screen reader users cannot immediately interact with the contents, and may need to manually move focus into the window.
A similar example can be seen in the SmartGWT Showcase:
https://smartclient.com/smartgwt/sho…ultilevel_sort Could you please recommend any approach to ensure that keyboard focus moves into the pop-up window when it opens?
- Click the “Multilevel Sort” button.
- The Sort dialog (MultiSortDialog) opens.
- Keyboard focus does not appear to automatically move into the dialog or its first interactive element.
- Keyboard navigation may remain on the element behind the dialog until the user manually sets focus inside the window.
-
Default Window control buttons (Close/Minimize)
For default Window class UI elements, the Close and Minimize buttons do not appear to be accessible for screen reader users. Since these are defaultSmartGWTcomponents, we cannot assign alt text or ARIA labels directly to their icons.
Is there a recommended way to make these default window controls accessible for keyboard and screen reader users?
Thank you for your guidance.
Thanks for the report - we’ve made some changes to improve popup (modal) window focus - without changing your code, you should find things working as you expect in tomorrow’s builds, dated March 19, and later ones.
We’ll get back to you on the window control-buttons.
Hello, Just following up to see if there are any updates regarding the window and closable tabs control buttons. Thank you!
Thanks for the nudge - this one slipped through the net, but we’ll take a look and update here when we have more information.
It turns out, the icons in Window headers are canFocus: false by default - you can call Window.setCanFocusInHeaderButtons(true) to make them keyboard accessible.
We noticed a misbehavior here - for a Window with focusable header icons, auto-focus would go to the header icons when the Window first opened.
We’ve made a change so that auto-focus still goes to a child component in the body - the header buttons are still accessible with TAB.
The change will be in tomorrow’s builds.
For the tabSet close buttons, you can’t actually focus in the close icon, but you can close the focused button with the keys listed in TabBar/TabSet.closeTabKeys - defaults to Alt+Delete and Ctrl+W.
Hi,
Your recommended approach using Window.setCanFocusInHeaderButtons(true) worked, and the Window header buttons are now keyboard-accessible. Though, I have a question regarding keyboard focus behaviour when closing a tabset tab using the Alt + Delete shortcut.
After closing the selected tab, the previous tab becomes selected. However, keyboard focus does not appear to move to that tab, and NVDA announces the application name instead.
Pressing Enter or Alt + Delete does not appear to move focus to the selected tab either. However, when I press Tab, focus moves to the next element, and keyboard navigation continues to work normally. But from an accessibility perspective, shouldn’t keyboard focus automatically move to the newly selected tab after the current tab is closed, allowing users to continue navigating the tabs using the keyboard?
We agree and we’ve made the change for today’s builds, dated November 5, and later ones.