-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Console screen-reader accessibility. #11602
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,20 @@ | |
</a> | ||
</kbn-tooltip> | ||
<span dropdown> | ||
<a class="editor_action" dropdown-toggle href="#"> | ||
<i class="fa fa-wrench"></i> | ||
<a | ||
id="consoleRequestOptions" | ||
class="editor_action" | ||
dropdown-toggle href="#" | ||
aria-label="Request options" | ||
> | ||
<span class="kuiIcon fa-wrench"></span> | ||
</a> | ||
|
||
<ul class="dropdown-menu" role="menu" aria-labelledby="split-button"> | ||
<ul | ||
class="dropdown-menu" | ||
role="menu" | ||
aria-labelledby="consoleRequestOptions" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This attribute lets us to refer to another element on the screen, which will describe the element to screen readers using an |
||
> | ||
<li role="menuitem"> | ||
<a class="link" id="copy_as_curl">Copy as cURL</a> | ||
</li> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
ng-mouseenter="history.viewingReq = req" | ||
ng-mouseleave="history.viewingReq = history.selectedReq" | ||
ng-dblclick="history.restore(req)" | ||
title="{{ req.description }}" | ||
aria-label="{{:: 'Request: ' + history.describeReq(req) }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this use aria-labelledby? ...If there is visible text labeling the element, use aria-labelledby instead.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, I think this is correct as-is. Based on my understanding, In this case, we technically don't even need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i did some digging, my notes below for reference. i'm not going to nit too much, there's room for opinions with the request prefix. https://github.com/w3c/aria/blob/master/aria/aria.html#L9578: |
||
class="list-group-item history-req" | ||
> | ||
{{ history.describeReq(req) }} | ||
|
@@ -25,7 +25,8 @@ | |
<button | ||
class="kuiButton kuiButton--primary" | ||
ng-disabled="!history.selectedReq" | ||
ng-click="history.restore()"> | ||
ng-click="history.restore()" | ||
> | ||
Apply | ||
</button> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the plan to move ids towards camel case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if there's a formal plan for this but we're using camel case pretty much everywhere (e.g. test subject selectors, even CSS class names), so I think it makes sense to be consistent by applying camel case to IDs too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want me to add a note to the HTML style guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 works for me