Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
b24cd902
Unverified
Commit
b24cd902
authored
May 11, 2020
by
Lyza Gardner
Committed by
GitHub
May 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2137 from hypothesis/aria-label-the-revenge
Adjust accessible text for groups menu label
parents
9dc86fda
e27f5d35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
group-list.js
src/sidebar/components/group-list.js
+5
-1
group-list-test.js
src/sidebar/components/test/group-list-test.js
+15
-0
No files found.
src/sidebar/components/group-list.js
View file @
b24cd902
...
...
@@ -89,13 +89,17 @@ function GroupList({ serviceUrl, settings }) {
return
label
;
}
const
menuTitle
=
focusedGroup
?
`Select group (now viewing:
${
focusedGroup
.
name
}
)`
:
'Select group'
;
return
(
<
Menu
align
=
"left"
contentClass
=
"group-list__content"
label
=
{
label
}
onOpenChanged
=
{()
=>
setExpandedGroup
(
null
)}
title
=
"Select group"
title
=
{
menuTitle
}
>
{
currentGroupsSorted
.
length
>
0
&&
(
<
GroupListSection
...
...
src/sidebar/components/test/group-list-test.js
View file @
b24cd902
...
...
@@ -72,6 +72,21 @@ describe('GroupList', () => {
$imports
.
$restore
();
});
it
(
'displays descriptive menu title about which group is currently selected'
,
()
=>
{
const
wrapper
=
createGroupList
();
const
menu
=
wrapper
.
find
(
'Menu'
);
assert
.
equal
(
menu
.
props
().
title
,
'Select group (now viewing: Test group)'
);
});
it
(
'adds descriptive label text if no currently-focused group'
,
()
=>
{
fakeStore
.
focusedGroup
.
returns
(
undefined
);
const
wrapper
=
createGroupList
();
const
menu
=
wrapper
.
find
(
'Menu'
);
assert
.
equal
(
menu
.
props
().
title
,
'Select group'
);
});
it
(
'displays no sections if there are no groups'
,
()
=>
{
const
wrapper
=
createGroupList
();
assert
.
isFalse
(
wrapper
.
exists
(
'GroupListSection'
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment