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

Adds 'reload' button to the map when controls are toggled on #200

Merged
merged 2 commits into from
Nov 10, 2020

Conversation

ahmadayubi
Copy link
Member

@ahmadayubi ahmadayubi commented Nov 3, 2020

Adds a reload button that takes the map back to the initial state, closes #119
Using reload as the label rather than using home is consistent with what the function is called in the context menu.

Comment on lines 12 to 14
link.title = "Home";
link.setAttribute('role', 'button');
link.setAttribute('aria-label', "Home");
Copy link
Member

@Malvoz Malvoz Nov 6, 2020

Choose a reason for hiding this comment

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

I understand that it's probably a convention to name a button with the functionality to reset to the initial location/starting point "home", but in the context of a web map I think that's unfortunate, it could be confusing to users with screen readers, they may interpret this as a button for locating their own home. Can we use something else?

Copy link
Member

Choose a reason for hiding this comment

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

The intent of the 'home' button (a little 'house' icon is a common visual metaphor these days) is to reset the map to the original zoom / lat / lon maybe without changing other conditions (such as opacities, new / added layers etc., tbdiscussed). What would be an appropriate role/label for such a function?

/cc @shepazu

Copy link
Member

@Malvoz Malvoz Nov 7, 2020

Choose a reason for hiding this comment

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

What would be an appropriate role/label for such a function?

The best I can think of is "Reset to initial location/view". "location" may make less sense in non-geo maps though.

Copy link
Member Author

Choose a reason for hiding this comment

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

In the context menu its known as reload, would that work?

@ahmadayubi ahmadayubi changed the title Adds home button to the map when controls are toggled on Adds 'reload' button to the map when controls are toggled on Nov 10, 2020
@ahmadayubi ahmadayubi marked this pull request as ready for review November 10, 2020 15:44
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.

Add a home button to pan and zoom map back to initial location
3 participants