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

Enable programmatic focus of a specific layer's features on the map #795

Closed
prushforth opened this issue Mar 13, 2023 · 1 comment
Closed

Comments

@prushforth
Copy link
Member

prushforth commented Mar 13, 2023

the HTMLLayerElement.focus() implementation should either focus the layer in the layer control, or focus the first or next element in the layer, without moving the map. We should figure out what the correct behaviour is

In any case, I think it should not be the layer control since a "layer" refers to the container (of features etc.) on the map itself, separate from the layer control?

Another option to consider is to enable programmatic focus (tabindex="-1") on the <div class="mapml-layer ..."> (this would make even more sense if each of those layer elements also had an accessible name: #579). One use case for that can be found in https://maps4html.org/experiments/screenreader/closest-restaurants/: after the "Restaurants" button has been pressed AT/keyboard users could/should be directed (have focus delegated) to the relevant features?

Originally posted by @Malvoz in #587 (comment)

@prushforth prushforth added this to the Winter 2023 milestone Apr 14, 2023
@prushforth prushforth removed this from the Winter 2023 milestone May 9, 2023
@prushforth
Copy link
Member Author

This is implemented for <map-feature> with the focus() method. The layer-.focus() method is renamed to layer-.zoomTo()

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

No branches or pull requests

1 participant