With tab panels annotated, VoiceOver reads tab name the 1st time focusing on any element within it. Steps: 1. Open Elements tab 2. Focus on any DOM tree outline item Expected: VoiceOver read the selected tree outline item and then "Elements, tab panel". After that, changing focus to any other element within the Elements tab doesn't not result VoiceOver reading "Elements, tab panel" again. Actual: VoiceOver read the selected tree outline item — nothing about the Elements tab.
Created attachment 392344 [details] Patch
<rdar://problem/60017450>
Comment on attachment 392344 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=392344&action=review r=me > Source/WebInspectorUI/ChangeLog:3 > + Web Inspector: AXI: annotate tab panels Please add an explanation as to why `role="main"` is not sufficient, and why `role="tabpanel"` is better. > Source/WebInspectorUI/UserInterface/Base/Main.js:1822 > + WI._contentElement.ariaLabel = WI.tabBar.selectedTabBarItem?.title || ""; Rather than check `WI.tabBar.selectedTabBarItem` more than once, why not pull it out into a variable and share it with the check below? ``` let selectedTabBarItem = WI.tabBar.selectedTabBarItem; if (selectedTabBarItem) { WI._contentElement.ariaLabel = selectedTabBarItem.title || ""; if (selectedTabBarItem.representedObject.constructor.shouldSaveTab()) WI._selectedTabIndexSetting.value = WI.tabBar.tabBarItems.indexOf(selectedTabBarItem); ```
Created attachment 392647 [details] Patch
Comment on attachment 392647 [details] Patch Clearing flags on attachment: 392647 Committed r257965: <https://trac.webkit.org/changeset/257965>
All reviewed patches have been landed. Closing bug.