Skip to content

Commit

Permalink
Add more specific titles to content picker dialog close buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Feb 15, 2024
1 parent 3f90f5d commit f9b047a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lms/static/scripts/frontend_apps/components/BookPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,9 @@ export default function BookPicker({
)}
// Opt out of Modal's automatic focus handling; route focus manually in
// sub-components
initialFocus={'manual'}
initialFocus="manual"
onClose={onCancel}
closeTitle="Close book picker"
scrollable={false}
title={
step === 'select-book'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default function JSTORPicker({
<ModalDialog
initialFocus={inputRef}
onClose={onCancel}
closeTitle="Close JSTOR picker"
scrollable={false}
title="Select JSTOR article"
size="lg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ export default function LMSFilePicker({
})}
title={`Select ${documentType}`}
onClose={onCancel}
closeTitle="Close document picker"
size="lg"
buttons={[
<Button data-testid="cancel-button" key="cancel" onClick={onCancel}>
Expand Down
1 change: 1 addition & 0 deletions lms/static/scripts/frontend_apps/components/URLPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default function URLPicker({
<ModalDialog
title="Enter URL"
onClose={onCancel}
closeTitle="Close URL picker"
buttons={[
<Button data-testid="cancel-button" key="cancel" onClick={onCancel}>
Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default function YouTubePicker({
<ModalDialog
title="Select YouTube video"
onClose={onCancel}
closeTitle="Close YouTube picker"
initialFocus={inputRef}
size="lg"
scrollable={false}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@hypothesis/frontend-build": "^3.0.0",
"@hypothesis/frontend-shared": "^7.4.0",
"@hypothesis/frontend-shared": "^7.5.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1968,15 +1968,15 @@ __metadata:
languageName: node
linkType: hard

"@hypothesis/frontend-shared@npm:^7.4.0":
version: 7.4.0
resolution: "@hypothesis/frontend-shared@npm:7.4.0"
"@hypothesis/frontend-shared@npm:^7.5.0":
version: 7.5.0
resolution: "@hypothesis/frontend-shared@npm:7.5.0"
dependencies:
highlight.js: ^11.6.0
wouter-preact: ^3.0.0
peerDependencies:
preact: ^10.4.0
checksum: 5744240cc37d0f2d30ff34f240cb95606c0f846fda8b52fba18d60ec5e402fde39629c3ff32593b36db3949a9556dc7c2f7985d2c281215d7877d87151d5b458
checksum: 180cef619b7a0d9c74ff0f580db211d86b7c41359b8c8c3bec3c04c71a6d028cbea1dc52867191c3a3e9cdcaa4bc8635d997f6beddefd438f2fa5b7153a60a74
languageName: node
linkType: hard

Expand Down Expand Up @@ -7651,7 +7651,7 @@ __metadata:
"@babel/preset-react": ^7.23.3
"@babel/preset-typescript": ^7.23.3
"@hypothesis/frontend-build": ^3.0.0
"@hypothesis/frontend-shared": ^7.4.0
"@hypothesis/frontend-shared": ^7.5.0
"@hypothesis/frontend-testing": ^1.2.0
"@rollup/plugin-babel": ^6.0.4
"@rollup/plugin-commonjs": ^25.0.7
Expand Down

0 comments on commit f9b047a

Please sign in to comment.