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

Lightbox controls do not appear when in a touch environment (mouseless) #36896

Open
samouri opened this issue Nov 11, 2021 · 3 comments
Open
Labels

Comments

@samouri
Copy link
Member

samouri commented Nov 11, 2021

Description

The <amp-lightbox-gallery> component should create Prev/Next buttons on the left and right side of the screen.
When emulating a phone (or on an actual phone), the controls never appear.

See:
image


I believe the root cause is the addition of i-amphtml-screen-reader:

const input = Services.inputFor(win);
if (!input.isMouseDetected()) {
el.querySelector('[data-action="prev"]').classList.add(
'i-amphtml-screen-reader'
);
el.querySelector('[data-action="next"]').classList.add(
'i-amphtml-screen-reader'
);
}

Reproduction Steps

  1. In Chrome, enable mobile emulation
  2. Go to https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fexamples%2Fcomponents%2Famp-lightbox-gallery&format=websites
  3. Click any image and notice that the left/right arrows do not appear

@ampproject/wg-components

@JuliaTrubchyk
Copy link
Collaborator

JuliaTrubchyk commented Jan 11, 2022

Same issue exist on Firefox / desktop

Screen Shot 2022-01-11 at 1 04 37 PM

@stale
Copy link

stale bot commented Jan 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Jan 7, 2023
@estherkim estherkim removed the Stale Inactive for one year or more label Apr 5, 2023
@dzarmanova
Copy link

dzarmanova commented Apr 5, 2023

The issue is still reproducible on desktop (Chrome and Firefox browser) and on mobile android device (Chrome browser)

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

5 participants