Skip to content
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

[a11y] Make the map and it's elements accessible #6211

Merged
merged 7 commits into from
Sep 7, 2022

Conversation

MichelGabriel
Copy link
Contributor

The main goal is to make the map accessible by keyboard.

Changes:

  • replace popover swith dropdowns (popovers are added at the end of the DOM and therefore not really accessible)
  • rewrite the base layer selection in a plain list (this also adds the necessary room for the dropdown to fit)
  • reorder the map panels: the panel is now directly after the open/close button in the DOM
  • map can now get the focus, so panning and zooming with the keyboard is possible
  • add focus outline style for the map
  • add focus style for the map buttons
  • improve focus style for location search
  • layerlist: more buttons are in the toolbar that is visible on hover
  • layerlist: button bar also visible on focus
  • change 'style popover' (now a dropdown) is added to this button bar

Smaller changes:

  • add href to links (enables focus)
  • more distinct focus state
  • legend panel is accessible

Extra:

  • cleanup some css, added some basic rules
  • improved whitespace
  • removed redundant divs

Some screenshots after the changes:

gn-map-manage-layers

gn-map-tools

gn-map-styles
gn-map-layertree

Fixed:
- map can now get the focus, so panning and zooming with the keyboard is possible
- add focus outline style for the map
- add focus style for the map buttons
- improve focus style for location search
The main goal is to make the map accessible by keyboard.

Changes:
- replace popover with dropdown (popovers are added at the end of the DOM and therefore not really accessible)
- rewrite the base layer selection in a plain list
- reorder the map panels: the panel is now directly after the `open/close` button in the DOM
- add focus to the map, this unlocks keyboard handling of the map
- layerlist: more buttons are in the toolbar that is visible on hover
- layerlist: button bar also visible on focus
- change style popover (now a dropdown) is added to the button bar

Smaller changes:
- add `href` to links
- more distinct `focus` state
- legend panel is accessible

Extra:
- cleanup some css, added some basic rules
- improved whitespace
- removed redundant `div`s
@josegar74 josegar74 added this to the 4.2.1 milestone Aug 31, 2022
@josegar74
Copy link
Member

Some items to review:

  1. Layer tools panel is not displayed fully

layer-tools-panel-hidden

  1. Similar with the add layers > style chooser

addlayer-style-chooser

  1. Disabled options, maybe to be displayed in gray?

disabled-options

@MichelGabriel
Copy link
Contributor Author

MichelGabriel commented Aug 31, 2022

@josegar74 thanks for reviewing. Going to fix the menus and disabled buttons.

@MichelGabriel
Copy link
Contributor Author

@josegar74 For me the menu's open to the left so they are displayed properly. Could it be cache?

@josegar74
Copy link
Member

@MichelGabriel I've cleanup the wro4j cache and the browser cache and get the same:

panel

@MichelGabriel
Copy link
Contributor Author

That is strange, is see this:

gn-map-menu-right

@MichelGabriel
Copy link
Contributor Author

Added some visual improvements to the services dropdown:

gn-services-dropdown

@MichelGabriel
Copy link
Contributor Author

Latest commit with improvements to the a11y aspects of the add layer list

gn-addlayer-list

- left align tools on small screens
- submenu in map panels now open to the left
Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM

@josegar74 josegar74 merged commit 705f7d6 into geonetwork:main Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants