WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
118106
Web Inspector: AX: Add additional contextual labels for Error/Warnings/Logs that will be spoken for screen readers
https://bugs.webkit.org/show_bug.cgi?id=118106
Summary
Web Inspector: AX: Add additional contextual labels for Error/Warnings/Logs t...
James Craig
Reported
Thursday, June 27, 2013 1:24:20 AM UTC
Web Inspector: AX: Add additional contextual labels for Error/Warnings/Logs that will be spoken for screen readers Icons next to each line in the console log indicate if it's an error, warning, or log. These are just background images, so look for "data-labelprefix" in the source to see how this is done for the "Input:" and "Output:" strings.
Attachments
patch
(7.66 KB, patch)
2013-08-16 17:46 PDT
,
James Craig
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
Thursday, June 27, 2013 1:24:35 AM UTC
<
rdar://problem/14284013
>
James Craig
Comment 2
Thursday, June 27, 2013 6:44:11 AM UTC
Dependent on
bug 115976
James Craig
Comment 3
Saturday, August 17, 2013 1:46:00 AM UTC
Created
attachment 208968
[details]
patch
Joseph Pecoraro
Comment 4
Saturday, August 17, 2013 3:31:53 AM UTC
Comment on
attachment 208968
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=208968&action=review
Nice!
> Source/WebInspectorUI/UserInterface/ConsoleCommandResult.js:49 > + if (!element.getAttribute("data-labelprefix"))
Nit: This check could be hasAttribute instead of getAttribute.
Joseph Pecoraro
Comment 5
Saturday, August 17, 2013 3:35:54 AM UTC
Comment on
attachment 208968
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=208968&action=review
> Source/WebInspectorUI/UserInterface/ConsoleMessageImpl.js:486 > + element.setAttribute("data-labelprefix", WebInspector.UIString("Tip: "));
We could even use elem.dataset for "data-x" attributes: element.dataset.labelprefix = WebInspector.UIString("Tip: "); However, I'm not sure if dataset is any clearer or more performant. So lets stick with your setAttribute calls. It makes it easy to search for "data-labelprefix" and find all the places we deal with it in code.
James Craig
Comment 6
Sunday, August 18, 2013 9:06:07 AM UTC
(In reply to
comment #4
)
> (From update of
attachment 208968
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=208968&action=review
> > Nice! > > > Source/WebInspectorUI/UserInterface/ConsoleCommandResult.js:49 > > + if (!element.getAttribute("data-labelprefix")) > > Nit: This check could be hasAttribute instead of getAttribute.
hasAttribute won't cover the empty string case, I believe. Without my shorthand version, I'd need to do this to cover both cases. if (!element.hasAttribute("data-labelprefix") || element.getAttribute("data-labelprefix") !== "") But I like the shorthand version better.
James Craig
Comment 7
Sunday, August 18, 2013 9:08:01 AM UTC
(In reply to
comment #5
)
> (From update of
attachment 208968
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=208968&action=review
> > > Source/WebInspectorUI/UserInterface/ConsoleMessageImpl.js:486 > > + element.setAttribute("data-labelprefix", WebInspector.UIString("Tip: ")); > > We could even use elem.dataset for "data-x" attributes: > > element.dataset.labelprefix = WebInspector.UIString("Tip: "); > > However, I'm not sure if dataset is any clearer or more performant. So lets stick with your setAttribute calls. It makes it easy to search for "data-labelprefix" and find all the places we deal with it in code.
Good idea. I could go either way on this, but it looks like you're leaning slightly toward searchability, so I'll leave it the way it is for now.
WebKit Commit Bot
Comment 8
Tuesday, August 20, 2013 2:30:18 AM UTC
Comment on
attachment 208968
[details]
patch Clearing flags on attachment: 208968 Committed
r154310
: <
http://trac.webkit.org/changeset/154310
>
WebKit Commit Bot
Comment 9
Tuesday, August 20, 2013 2:30:21 AM UTC
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug