forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the accessibility of ClearBrowsingDataPreferences
This CL fixes accessibility issues of preferences in ClearBrowsingDataPreferences. 1. Checkboxes were losing focus after (un)checking. 2. The time period dropdown value was being re-announced whenever screen was scrolled away and back to it. 3. Checkboxes did not announce when the summary (the result of BrowsingDataCounter) was updated. 1. and 2. are caused by the View of the Preference being recreated. We now cache it in both ClearBrowsingDataCheckBoxPreference and SpinnerPreference. Note that this was also the cause of crbug.com/588687. In addition, in SpinnerPreference, the problem was also caused by adapter being constantly resupplied, even though it hasn't changed. We now only call setAdapter() if a different adapter has actually been passed to SpinnerPreference in the meantime. This is done for generality; currently, we only supply adapter to SpinnerPreference once. Problem 3. was solved by explicitly calling announceForAccessibility(result). Here, we want to provide the user with direct feedback - when a checkbox is checked, a subsequent counter result should be announced. However, when the dialog is just being initialized, or the time period changed, BrowsingDataCounters related to all checkboxes are reset, which would cause unnecessary noise. Therefore, we only announce the result if the recalculation was caused by changing the checkbox state. BUG=590755,588687 Review URL: https://codereview.chromium.org/1748403006 Cr-Commit-Position: refs/heads/master@{#379802}
- Loading branch information
Showing
3 changed files
with
51 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters