-
Notifications
You must be signed in to change notification settings - Fork 155
Path selector accessibility #4621
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
Changes from all commits
58e344e
811a3ac
c7dd41f
43eef9b
0f05b6f
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<li role='button' | ||
class='clickable text-wrap list-group-item list-group-item-action' | ||
data-api-url=<%= files_path(path.to_s, fs: path.filesystem) %>> | ||
<%= fa_icon((path.to_s == Dir.home ? 'home' : path.icon), classes: '') %> | ||
<%= path.title || path %> | ||
</li> | ||
<a href="#" | ||
class='text-wrap list-group-item list-group-item-action link-dark' | ||
data-api-url=<%= files_path(path.to_s, fs: path.filesystem) %>> | ||
<%= fa_icon((path.to_s == Dir.home ? 'home' : path.icon), classes: '') %> | ||
<%= path.title || path %> | ||
</a> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
<%= form.text_field(attrib.id, class: 'form-control', **options) %> | ||
|
||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#<%= path_selector_id %>"> | ||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#<%= path_selector_id %>" aria-label="<%= I18n.t('dashboard.select_path_for', element: attrib.label) %>"> | ||
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. Unfortunately this may not be an improvement, I like the idea of relating it to the form item label, but this gets read out as "#{aria-label} button". So if I have a form item called "working directory", it reads as "Select path for form element working directory button" which might be confusing since it sounds like "working directory button" is the element (when working directory label should really go with the input not the button). A quick test shows that aria-labelledby will make it read "working directory button", which is even worse. Maybe we just rearrange the message so that it reads "for form item working directory select path button"? I don't love that though and am very open to other solutions. Whatever we go with needs to be less confusing than "select path button" which was the previous behavior 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. Maybe we can phrase it "Select path button for working directory" to avoid that while keeping a phrase that doesn't sound strange? 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. Though that does have the screen reader not reading "button" last 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. Yeah I also would prefer it didn't read 'button' last, just not sure if its possible given the label-type format I was noticing. Don't want to discourage you though if you have an idea to get that behavior 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. Because "button" isn't actually in the string but is just the screen reader describing the element, it might actually be more clear to someone using a screenreader regularly, though I'm not certain about this. |
||
<%= I18n.t('dashboard.select_path') %> | ||
</button> | ||
|
||
|
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 feel like this should still be
ol
andli
even if the internal is ana
.To me, it makes sense to present it as a list of anchors, much like navbar entries, favorites in the files index and interactive apps in my interactive sessions.
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.
This was mainly used to follow bootstrap's recommendations. If we use
<div>
and<a>
for lists with interactive elements,list-group
handles accessibility for us without a bunch ofaria-*
attributes.Here is where they recommend to use these elements in list groups