-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix($theme-default): Make navbar dropdown links accessible #1837
Merged
Merged
Changes from 14 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
311f11f
#1818 | Make Accessibility Elements in navbar
edisdev 44462b6
fix: Change to dropdownlink test
edisdev 3593b4b
fix: change to testing for dropdownlink component
edisdev e996d18
Merge branch 'accessibility-dropdown' of https://github.com/edisdev/v…
edisdev 510be5b
feat: addauto opened & focus dropdown menu when keypress tab
edisdev 380911d
fix: update test for dropdownLink
edisdev fd30a60
edit tabindex to navlink & dropdownlink for not focusable
edisdev 8bd733f
Update docs for notFocusable props
edisdev 1b38f36
Update dropdownlink test
edisdev a5a66f1
Add keypress method in navlink and remove tabindex
edisdev 0a27789
Rename navlink & dropdown action / computed and bugfix for find last …
edisdev 96b1287
Make ariaLabel config for dropdown
edisdev c67010e
fix typo
edisdev e84b6c6
fix typo dropdown computed
edisdev 6da2e5f
edit language dropdown aria-label default value
edisdev 842157d
update docs for ariaLabel property
edisdev 371af79
feat: Try to improve code readability
kefranabg 0ef66cc
add aria-label property in docs page (theme)
edisdev 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 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
2 changes: 1 addition & 1 deletion
2
...ages/@vuepress/theme-default/__tests__/components/__snapshots__/DropdownLink.spec.js.snap
This file contains 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 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 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 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 |
---|---|---|
|
@@ -54,6 +54,7 @@ export default { | |
const themeLocales = this.$site.themeConfig.locales || {} | ||
const languageDropdown = { | ||
text: this.$themeLocaleConfig.selectText || 'Languages', | ||
ariaLabel: this.$themeLocaleConfig.ariaLabel || 'Languages', | ||
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. The default value should be |
||
items: Object.keys(locales).map(path => { | ||
const locale = locales[path] | ||
const text = themeLocales[path] && themeLocales[path].label || locale.lang | ||
|
This file contains 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 |
---|---|---|
|
@@ -39,6 +39,7 @@ module.exports = ctx => ({ | |
'/': { | ||
label: 'English', | ||
selectText: 'Languages', | ||
ariaLabel: "Languages", | ||
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. The value should be |
||
editLinkText: 'Edit this page on GitHub', | ||
lastUpdated: 'Last Updated', | ||
nav: require('./nav/en'), | ||
|
@@ -52,6 +53,7 @@ module.exports = ctx => ({ | |
'/zh/': { | ||
label: '简体中文', | ||
selectText: '选择语言', | ||
ariaLabel: "选择语言", | ||
editLinkText: '在 GitHub 上编辑此页', | ||
lastUpdated: '上次更新', | ||
nav: require('./nav/zh'), | ||
|
This file contains 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 |
---|---|---|
|
@@ -17,6 +17,7 @@ module.exports = [ | |
}, | ||
{ | ||
text: "Learn More", | ||
ariaLabel: "Learn More", | ||
items: [ | ||
{ | ||
text: "API", | ||
|
This file contains 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 |
---|---|---|
|
@@ -17,6 +17,7 @@ module.exports = [ | |
}, | ||
{ | ||
text: "了解更多", | ||
ariaLabel: "了解更多", | ||
items: [ | ||
{ | ||
text: "API", | ||
|
This file contains 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 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 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
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.
This part is kind of hard to read/understand, I'll try to find something easier for this part
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 too will try to find to a more easy solution.