Skip to content

A11y improvements #3

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

Merged
merged 3 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_mapcontrols/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"window": {
"marginBox": {
"r": 75,
"b": 60,
"b": 58,
"w": 200,
"h": 260
},
Expand Down
1 change: 1 addition & 0 deletions src/main/js/bundles/dn_mapcontrols/nls/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const i18n = {
tooltip: "Map Controls"
},
northArrow: "Direction of north",
northArrowDescription: "Can be changed with the arrow keys left and right. Enter resets the rotation.",
moveUp: "Move view forward",
moveDown: "Move view backward",
moveLeft: "Move view left",
Expand Down
1 change: 1 addition & 0 deletions src/main/js/bundles/dn_mapcontrols/nls/de/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
tooltip: "Kartensteuerung"
},
northArrow: "Nordrichtung",
northArrowDescription: "Kann mit den Pfeiltasten Links und Rechts verändert werden. Enter setzt die Rotation zurück.",
moveUp: "Ansicht nach vorne verschieben",
moveDown: "Ansicht nach hinten verschieben",
moveLeft: "Ansicht nach links verschieben",
Expand Down
6 changes: 5 additions & 1 deletion src/main/js/bundles/dn_mapcontrols/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
.ctAppRoot{
.mapControlsWidget .vue-base{
padding: 12px;
padding: 14px;
}

.pseudoWindow.mapControlsWidget {
Expand Down Expand Up @@ -48,6 +48,10 @@
border-radius: 50px;
z-index: 1;
border: 1px solid #000;

&:focus {
outline: 3px solid currentColor;
}
}

.mapControlsWidget .ct-mapcontrols__controlwrapper{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,21 @@
id="picker"
ref="picker"
class="picker"
:aria-label="i18n.ui.northArrow"
role="button"
tabindex="0"
:style="rotationStyle"
>
<v-icon
class="ct-mapcontrols__northarrow"
color="#45474D"
tabindex="0"
role="button"
:aria-label="i18n.ui.northArrow"
:aria-description="i18n.ui.northArrowDescription"
aria-hidden="false"
@mousedown="circleMouseDown"
@click="resetNorthArrow"
@keyup.enter="resetNorthArrow"
@keydown.left="rotation -= 5"
@keydown.right="rotation += 5"
>
esri-icon-compass
</v-icon>
Expand Down Expand Up @@ -235,9 +240,6 @@


circleMouseDown(event){
/* TODO: implement alternate version for Keyboard users
* maybe left/right arrows while focus on north arrow
*/
this.pickerCircleMouseDown(event);
this.longpressed = false;
this.pressTimer = setTimeout(() => {
Expand Down
Loading