New issue
Advanced search Search tips

Issue 692362 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug
Team-Accessibility



Sign in to add a comment

MacViews/a11y: Allow read-only views::Textfields to set selected text range via a11y, but not protected Textfields.

Project Member Reported by patricia...@chromium.org, Feb 15 2017

Issue description

Selectable (but not editable) native Cocoa textfields allow the selected text range to be changed via an accessibility client, but in Chrome, views::Textfields only allow editable Textfields to change the selected text range.

Fix this behaviour to match - probably involves changing views::Textfield::SetSelectionRange() to not use ImeEditingAllowed() and instead gate changing the selection on ui::TextInputType == ui::TEXT_INPUT_TYPE_PASSWORD.

To repro:

1. Open the Accessibility Inspector.
2. Either find a read-only textfield in Chrome (I'm not aware of one) and skip to step 4, or change views::Textfield::read_only() to always return true.
3. Open the bookmark bubble and click 'Edit'. The name of the bookmark should already be populated, but it'll be read-only (so there's some text to select).
4. Select some text in the read-only textfield.
5. Use the Accessibility Inspector to view the NSAccessibilitySelectedTextRange. It should match up with the current selection, and provide an option to edit the range.
6. Editing the range should change the selection in the read-only Textfield. (Selection should show up when refocusing on the dialog due to Issue 645338).
7. Repeating steps 4 to 5 with a password views::Textfield should not show that the selected text range is editable.
 
Labels: NewComponent-Accessibility NewComponent-Accessibility-Compatibility
Components: UI>Accessibility>Compatibility
Components: -UI>Accessibility
Labels: -newcomponent-accessibility-compatibility -newcomponent-accessibility

Sign in to add a comment