Radio input keyboard navigation does not scroll parent element
Reported by
i...@nathanmarks.io,
Dec 15 2016
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36 Steps to reproduce the problem: 1. https://jsfiddle.net/6bugmpkw/ 2. Tab into or select a radio 3. Use the arrow keys to navigate the radios What is the expected behavior? The parent container should scroll to maintain accessibility standards while using the native radio input keyboard controls. Firefox does this and it provides a much better experience for keyboard users. Also note, that chrome DOES scroll the container for other elements that are focused. Here is an example with a link underneath the radios. You'll notice that if you tab to the link, it will scroll the parent container: https://jsfiddle.net/y17cpun9/ What went wrong? The radio input focus does not cause the parent container to scroll. Did this work before? N/A Chrome version: 54.0.2840.98 Channel: stable OS Version: OS X 10.12.0 Flash Version: Shockwave Flash 24.0 r0
,
Dec 16 2016
,
Dec 16 2016
,
Dec 16 2016
scrollRectToVisible() isn't called because RadioInputType::handleKeydownEvent() calls document.setFocusedElement() with SelectionBehaviorOnFocus::None.
,
Jan 11 2017
@tkent I have uploaded a patch for this issue. PTAL https://codereview.chromium.org/2620843004/
,
Jan 11 2017
preeti.nayak@, - please publish the code review. - please add a test
,
Jan 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f817f12c1ee224c86e0baf45c816d89dfb345aa3 commit f817f12c1ee224c86e0baf45c816d89dfb345aa3 Author: preeti.nayak <preeti.nayak@samsung.com> Date: Tue Jan 17 07:41:05 2017 This patch scrolls the parent container while navigating through the radio input using keyboard BUG= 674567 Review-Url: https://codereview.chromium.org/2620843004 Cr-Commit-Position: refs/heads/master@{#443999} [add] https://crrev.com/f817f12c1ee224c86e0baf45c816d89dfb345aa3/third_party/WebKit/LayoutTests/fast/forms/radio/radio-input-keyboard-navigation.html [modify] https://crrev.com/f817f12c1ee224c86e0baf45c816d89dfb345aa3/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp
,
Jan 17 2017
,
Jan 19 2017
Verified the fix on the latest canary(57.0.2986.0) on Windows-10, Mac OS 10.12.2 and Linux Ubuntu 14.04. This is working as intended and content scrolls when navigated through radio buttons through arrow down/up key. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by karandeepb@chromium.org
, Dec 16 2016