New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 841582 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Settings: controlled-radio-button can be keyboard-selected even when controlled by policy.

Project Member Reported by scottchen@chromium.org, May 9 2018

Issue description

When a controlled-radio-button is supposed to be disabled by policy, while it correctly forbids selection via clicking, the user currently can still select the radio button by:

1) focus another radio button in the same group
2) use up/down arrow key to move the selection to the radio button


 
Screenshot from 2018-05-09 15-23-27.png
10.6 KB View Download
I found out that if the radio-button element within a <paper-radio-group> has the 'disabled' attribute, it becomes un-selectable for free. We're currently using the attribute name 'controlled_' to mark disabled state, so I think just renaming this to 'disabled' will work.

I did think about "what if we want to manually make it <controlled-radio-button disabled> but not controlled_?" but this case doesn't not currently exist in our code-base, and it being a <controlled-radio-button> I don't see a likely case for this to happen, so not too concerned about conflating the two.

Labels: OS-Chrome OS-Linux OS-Mac OS-Windows
Project Member

Comment 3 by bugdroid1@chromium.org, May 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/498bc13110a6814ac7a64d9858ac13f381b5fa10

commit 498bc13110a6814ac7a64d9858ac13f381b5fa10
Author: Scott Chen <scottchen@chromium.org>
Date: Thu May 10 02:24:19 2018

Settings: fix controlled-radio-button selectable while disabled

When a controlled-radio-button is controlled by policy, it should
not be selectable. While clicks are correctly blocked, users can
still erroneously select it with keyboard navigation.

This is fixed by changing the "controlled_" attribute to the standard
"disabled" attribute.

Bug:  841582 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I40f25379f9fc82b51d93f17587ef8c7d2c864e09
Reviewed-on: https://chromium-review.googlesource.com/1053267
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557429}
[modify] https://crrev.com/498bc13110a6814ac7a64d9858ac13f381b5fa10/chrome/browser/resources/settings/controls/controlled_radio_button.html
[modify] https://crrev.com/498bc13110a6814ac7a64d9858ac13f381b5fa10/chrome/browser/resources/settings/controls/controlled_radio_button.js
[modify] https://crrev.com/498bc13110a6814ac7a64d9858ac13f381b5fa10/chrome/test/data/webui/settings/controlled_radio_button_tests.js

Status: Fixed (was: Started)

Sign in to add a comment