Open Bug 1461533 Opened 6 years ago Updated 1 year ago

Revoking the permission to override keyboard shortcuts still lets thehill.com override page down behavior

Categories

(Core :: DOM: Events, defect, P3)

59 Branch
defect

Tracking

()

Accessibility Severity s3

People

(Reporter: erwinm, Unassigned)

References

()

Details

(Keywords: access, Whiteboard: [sci-exclude])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180323154952 Steps to reproduce: I visited this article: http://thehill.com/homenews/administration/360852-trump-building-in-panama-tied-to-russian-mafia-international-crime I tried to page down. Actual results: Instead of immediately paging down, it animated scrolling down. Such scrolling can hurt, and can trigger migraines. For the record, I disable autoscrolling and smooth scrolling, and use a specialized mouse, with two buttons mapped to page up and page down, as well as Scroll+ for shorter-distance scrolling. Expected results: It should immediately page down, to avoid animation. Firefox should probably override sites which override regular page down. It works in reader view.
Has STR: --- → yes
Component: Untriaged → DOM: Events
Keywords: access
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
It's expected default behavior that sites can do stuff like this, but it seems to me that revoking the site permission (in Page Info) to override keyboard shortcuts should prevent the site from doing this. Revoking that permission seems to have no effect.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: On some pages, Page Down triggers animation → Revoking the permission to override keyboard shortcuts still lets thehill.com override page down behavior
Whiteboard: [sci-exclude]

I have no idea how to do this when an editable element has focus because PageDown is a navigation key, which may be managed by the native key bindings so that we cannot reserve the key simply...
https://searchfox.org/mozilla-central/rev/13d69189a8abfc5064fe44944550b9b6eb4544f5/dom/events/GlobalKeyListener.cpp#407-421

On the other hand, I don't know why it's not reserved in the other cases if user prevents web apps to override keyboard events. In my understanding, PageDown key is managed by the GlobalKeyListener...

Severity: normal → S3

Okay why do websites get to hijack navigation keys? Users may need to be able to navigate the websites without using mice.

(In reply to MarjaE from comment #4)

Okay why do websites get to hijack navigation keys?

Web apps can provide pseudo scrollable area, e.g., painting content into <canvas> with self-rendered scrollbar. Therefore, from point of view of platform of web apps, any keyboard events should be exposed.

Triaging as access-s3 for now -- it sounds like the general issue here is around key hijacking, which is a separate issue from the motion sensitivity trigger of the particular page in #c0.
I'm going to See Also our bug around creating a no-motion preference

Whiteboard: [sci-exclude] → [sci-exclude][access-s3]
Whiteboard: [sci-exclude][access-s3] → [sci-exclude]
Accessibility Severity: --- → s3

I can't repro this bug using the original link [1], but a very similar or identical bug is easily repro'd at nationalzero.com, which uses disqus. To repro:

  1. Set permissions.defaults.shortcuts = 3 [ask] or 2 [deny].
  2. Open any article at nationalzero.com.
  3. Type ctrl/end. Notice how it properly displays the end of the article. Type ctrl/home and notice how it properly displays the top of the article.
  4. Scroll down to the comments.
  5. Scroll down until you see "Load more comments".
  6. Click it.
  7. Now type ctrl/home. Nothing happens. It should display the top of the article.
  8. Type ctrl/end. Nothing happens. It should display the bottom of the article.

See also bug 1795555.

[1] Maybe thehill.com fixed their override? I used to see the exact same bug there.

You need to log in before you can comment on or make changes to this bug.