-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix($theme-default): Make navbar dropdown links accessible #1837
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 4 commits
311f11f
44462b6
3593b4b
e996d18
510be5b
380911d
fd30a60
8bd733f
1b38f36
a5a66f1
0a27789
96b1287
c67010e
e84b6c6
6da2e5f
842157d
371af79
0ef66cc
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
> | ||
<a | ||
class="dropdown-title" | ||
:aria-label="dropdownName" | ||
@click="toggle" | ||
> | ||
<span class="title">{{ item.text }}</span> | ||
|
@@ -65,6 +66,10 @@ export default { | |
props: { | ||
item: { | ||
required: true | ||
}, | ||
dropdownName: { | ||
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. Why using a props for the dropdown name? Why don't we just keep it as a local variable in the component? Btw I think we should consider a way to make this label customizable. The user might want to display different labels depending on the current selected language. This should be a default theme local. Could you add this feature and update the documentation? |
||
default: 'Dropdown', | ||
type: String | ||
} | ||
}, | ||
|
||
|
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.
The NavLink element should be only when it acts as a link (e.g. has a valid
href
value). If it's acting as a trigger to open a dropdown navigation, it should be a . This should probably remove the need to set an explicit tabindex ( without href is not focusable, but is focusable, at least on Chrome).