[webkit-reviews] review granted: [Bug 208542] Web Inspector: AXI: annotate tab panels : [Attachment 392344] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 5 16:06:23 PST 2020
Devin Rousso <drousso at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 208542: Web Inspector: AXI: annotate tab panels
https://bugs.webkit.org/show_bug.cgi?id=208542
Attachment 392344: Patch
https://bugs.webkit.org/attachment.cgi?id=392344&action=review
--- Comment #3 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 392344
--> https://bugs.webkit.org/attachment.cgi?id=392344
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);
```
More information about the webkit-reviews
mailing list