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

Tabbing through features has a hiccup - skip block gets stuck between set of polygon and point features #325

Closed
prushforth opened this issue Feb 26, 2021 · 7 comments · Fixed by #334
Labels

Comments

@prushforth
Copy link
Member

prushforth commented Feb 26, 2021

Steps to reproduce

Visit this experiment, which has a set of features in the DOM. Press Tab twice, the first polygon feature (quite small) should be focused. Hit Enter. Hit Tab 3x to focus the ">" affordance. Hit Enter. The second polygon feature should be focused. Hit Enter, then Tab 3x, then Enter. The third polygon feature should be focused. Hit Tab 3x, then Enter. The focus should go to the fourth feature (a point) but it does not, it stays on the Prescott Hotel, a very fine Italian eatery and tavern. You need to hit Tab to get to the fourth feature.

Edit: In playing with the ">" affordance more, when the set of features in focus contains points, the "<" and ">" don't seem to focus the next or previous feature reliably, you always need to add a Tab or Shift-Tab to get focus to where you want.

@prushforth prushforth added the bug label Feb 26, 2021
@ahmadayubi
Copy link
Member

This is probably due to the manual nature of focus, it only accounts for features that use <path> and not <img>, as those are not in the same pane.

@prushforth
Copy link
Member Author

See, that's why standards are important

@ahmadayubi
Copy link
Member

Right, its a difference between Leaflet and MapML abstractions. With the viewer it'll be challenging forcing it to conform to MapML abstractions since it's built on Leaflet.

@prushforth
Copy link
Member Author

You don't see this problem when you hit tab, by the way, the tab sequence seems correct. It's just with the "previous" and "next" affordances.

@prushforth
Copy link
Member Author

Also, the brain dead rendering approach I used with points maps them to Leaflet markers, which is not too flexible. Would be better realized as some svg rendering, I think. Maybe @shepazu or @AmeliaBR can advise.

@ahmadayubi
Copy link
Member

When you hit tab it won't be in document order, it'll be in the leaflet pane order.
order

So if you had a point before a polygon in a mapml file, the polygon would still focus first as that pane comes before the marker pane.

@ahmadayubi
Copy link
Member

Also, the brain dead rendering approach I used with points maps them to Leaflet markers, which is not too flexible. Would be better realized as some svg rendering, I think. Maybe @shepazu or @AmeliaBR can advise.

You could create a custom marker layer that extends L.polygon and create an svg marker that doesn't scale with zooms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants