-
Notifications
You must be signed in to change notification settings - Fork 52
Add missing tabindex and keyboard functions #311
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
Closed
ahamelers
wants to merge
1
commit into
Authress-Engineering:release/2.4
from
ahamelers:accessibility/keyboard-access
+5
−5
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,8 @@ export function expandedEndpointBodyTemplate(path, tag) { | |
| ${this.renderStyle === 'read' ? html`<div class='divider' part="operation-divider"></div>` : ''} | ||
| <div class='expanded-endpoint-body observe-me ${path.method}' part="section-operation ${path.elementId}" id='${path.elementId}'> | ||
| ${(this.renderStyle === 'focused' && tag && tag.name !== 'General ⦂') | ||
| ? html`<h1 style="display: inline; align-self: center" class="title tag-link" role="heading" aria-level="1" data-content-id="${tag.elementId}" | ||
| @click="${(e) => this.scrollToEventTarget(e, false)}"> ${tag?.name} ${tagSummary}</h1>` | ||
| ? html`<h1 style="display: inline; align-self: center" class="title" data-content-id="${tag.elementId}" | ||
| ><span class="tag-link" role="link" tabindex="0" @click="${(e) => this.scrollToEventTarget(e, false)}" @keydown="${(e) => { if (e.key === 'Enter') { e.target.click(); }}}"> ${tag?.name} ${tagSummary}</span></h1>` | ||
|
Comment on lines
-23
to
+24
Member
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. What is using |
||
| : ''} | ||
| <slot name="${tag.elementId}"></slot> | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm looking at this and wondering if it wouldn't make more sense to change this to a button and the other one to a link, that feels like a better fix, and we'll have to adjust the css to account for that. The PR description says there are "a lot of these", but I only count 4 in this PR. If there are only four we can inline the css, otherwise we'll likely want to a new css class to handle this stuff.
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.
That would be ideal, and much cleaner in my opinion!
There are others where much more extensive changes (usually around aria-expanded and aria-controls) are needed to the same element, and I was hoping to the keyboard navigation AND other needed changes to those together in separate PRs, to prevent merge conflicts.
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.
It's hard for me to understand what that would entail to give advice. Is there such a thing as a perfectly configurable accessible button that then we can go and put everywhere? Or are there complex changes needed for each button? For me it mainly feels like a styling problem, and aria label application, is there something else too? Do you have some examples we can iterate on to figure out the complexity? You've looked at this already, what are you thinking exactly?