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

Questions about UA-provided controls (<map controls>) #88

Open
zcorpan opened this issue Jun 29, 2020 · 3 comments
Open

Questions about UA-provided controls (<map controls>) #88

zcorpan opened this issue Jun 29, 2020 · 3 comments
Labels

Comments

@zcorpan
Copy link

zcorpan commented Jun 29, 2020

The controls boolean attribute

Is there any indication about whether web developers would be satisfied with using UA-provided controls for maps? Which controls are UAs expected to provide? Should these be stylable? Can they be extended?

It might be worth investigating lessons learnt from video.

@prushforth
Copy link
Member

Is there any indication about whether web developers would be satisfied with using UA-provided controls for maps?

We haven't done developer surveys, if that's what you mean. On the other hand, I think it's safe to assume that the UA-provided controls would not be adequate for all use cases, and would likely need to be customizable, somehow.

Initially I had anticipated that we would allow the dev to turn them all off, or all on, via the controls boolean attribute. They could then re-create all the controls they wanted via methods similar (I believed) to what was the standard way for <video> elements. @Malvoz pointed out that this space is evolving, and so we have been thinking about how to allow selective control enablement.

Which controls are UAs expected to provide?

Good question. Needs discussion.

Should these be stylable?

I don't think so.

Can they be extended?

I don't think so, but, they should be replaceable though, and the replacements would have to be styleable in the usual way. I was thinking we could specify another attribute for that would "freeze" it (so it wouldn't pan or zoom). The user could put custom controls in that layer if they wished, using CSS grid or something like that. The controls would have to be able to listen for map and layer events, I suppose like any other HTML elements. In this way, the user agent wouldn't necessarily be on the hook to implement every last control that is conceivable, or specific to a particular layer type, and so on.

@Malvoz
Copy link
Member

Malvoz commented Jul 4, 2020

Should these be stylable? Can they be extended?

It might be worth investigating lessons learnt from video.

There is a WICG issue about potentially enabling customizing default controls for video. But relying on the ControlsList API as currently defined may be insufficient (as ControlsList doesn't deal with positioning of controls).

It should be noted that there are vendor-prefixed CSS pseudo-elements that allow for styling the default controls for video/audio to some degree.

I think it'd make most sense to authors and implementers that whatever method the web platform ends up with that would enable (true) customization for video/audio controls it'd be the same for maps. Maybe WICG/Open-UI can pave the way: openui/open-ui#213.

@prushforth prushforth transferred this issue from Maps4HTML/HTML-Map-Element Jul 22, 2020
@Malvoz
Copy link
Member

Malvoz commented Oct 29, 2020

Which controls are UAs expected to provide?

I think we can quite confidently say at least:

  • Fullscreen control
  • Layer control
  • Pan controls
  • Zoom controls

These controls are expected, and can be removed from the exposed UI using the controlslist's nofullscreen, nolayer, nopan and nozoom keywords respectively.

Controls to pan may be important for users who cannot perform drag/swipe gestures (see WCAG Understanding Success Criterion 2.5.1: Pointer Gestures & technique G215 for more info), however it seems most frameworks do not provide this by default, likely due to the fact that they'd take up a lot of real estate in the map viewer (would require separate buttons to pan in each direction).

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

No branches or pull requests

3 participants