label="$i18n{showBookmarksBar}"i think we should map this label to the other dropdown menus and add a translation for "Bookmarks bar" and set it here and in line 180
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
i think we should map this label to the other dropdown menus and add a translation for "Bookmarks bar" and set it here and in line 180
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
From chrome/chromeos/assistant/assistive.gwsq:
The reviewer queue could not find an appropriate reviewer for this CL. Falling back to the team alias
Reviewer source(s):
xiaohuic is from group(xc-...@google.com)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Generally LGTM. But let's also loop somebody from //chrome/browser/resources/settings/OWNERS in
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Generally LGTM. But let's also loop somebody from //chrome/browser/resources/settings/OWNERS in
I think you have ownership already?
`bookmarks::prefs::kBookmarkBarVisibilityState` preference. New
localized strings are added for these options, and the preference isUse active voice: "Add new localized strings for these options", then do the same for the rest of the paragraph.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
`bookmarks::prefs::kBookmarkBarVisibilityState` preference. New
localized strings are added for these options, and the preference isUse active voice: "Add new localized strings for these options", then do the same for the rest of the paragraph.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Lei ZhangGenerally LGTM. But let's also loop somebody from //chrome/browser/resources/settings/OWNERS in
I think you have ownership already?
Yep via //chrome/OWNERS. But I'm not a dedicated owner of chrome://settings. So, I thought it would be good if somebody maintaining that page to take a look.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Lei ZhangGenerally LGTM. But let's also loop somebody from //chrome/browser/resources/settings/OWNERS in
Tibor GoldschwendtI think you have ownership already?
Yep via //chrome/OWNERS. But I'm not a dedicated owner of chrome://settings. So, I thought it would be good if somebody maintaining that page to take a look.
You want chrome/browser/resources/settings/OWNERS then, because I'm also in chrome/OWNERS.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Lei ZhangGenerally LGTM. But let's also loop somebody from //chrome/browser/resources/settings/OWNERS in
Tibor GoldschwendtI think you have ownership already?
Lei ZhangYep via //chrome/OWNERS. But I'm not a dedicated owner of chrome://settings. So, I thought it would be good if somebody maintaining that page to take a look.
You want chrome/browser/resources/settings/OWNERS then, because I'm also in chrome/OWNERS.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
suite('BookmarksBarVisibilitySettings', () => {Is a new suite() really needed? The suite below only consists of a single test() case. Could it be part of the suite above (and maybe also rename that suite to `AppearancePage`) ?
ntpSimplificationBookmarksBarEnabled: true,Do tests for the `false` case already exist in this file? If not can you add such a test?
setup(async () => {
loadTimeData.overrideValues({
ntpSimplificationBookmarksBarEnabled: true,
});
appearanceBrowserProxy = new TestAppearanceBrowserProxy();
AppearanceBrowserProxyImpl.setInstance(appearanceBrowserProxy);
createAppearancePage();
await microtasksFinished();
});```suggestion
setup(() => {
loadTimeData.overrideValues({
ntpSimplificationBookmarksBarEnabled: true,
});
appearanceBrowserProxy = new TestAppearanceBrowserProxy();
AppearanceBrowserProxyImpl.setInstance(appearanceBrowserProxy);
createAppearancePage();
return microtasksFinished();
});
```
teardown(function() {
appearancePage.remove();
});Unecessary. In createAppearancePage() the DOM is cleared anyway, no? Let's remove.
0, appearancePage.get('prefs.bookmark_bar.visibility_state.value'));Use getPref() from the PrefsMixin to directly access pref values in TypeScript.
(Here and elsewhere)
assertTrue(!!selectElement);This is unnecessary. Elements accessed via `$` are expected to always exist.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
suite('BookmarksBarVisibilitySettings', () => {Is a new suite() really needed? The suite below only consists of a single test() case. Could it be part of the suite above (and maybe also rename that suite to `AppearancePage`) ?
Thanks for the suggestion, removed the new suite and consolidate cases into the suite above, and, renamed it to `AppearancePage`.
Do tests for the `false` case already exist in this file? If not can you add such a test?
Added a test for the `false` (fallback) case.
setup(async () => {
loadTimeData.overrideValues({
ntpSimplificationBookmarksBarEnabled: true,
});
appearanceBrowserProxy = new TestAppearanceBrowserProxy();
AppearanceBrowserProxyImpl.setInstance(appearanceBrowserProxy);
createAppearancePage();
await microtasksFinished();
});```suggestion
setup(() => {
loadTimeData.overrideValues({
ntpSimplificationBookmarksBarEnabled: true,
});appearanceBrowserProxy = new TestAppearanceBrowserProxy();
AppearanceBrowserProxyImpl.setInstance(appearanceBrowserProxy);
createAppearancePage();
return microtasksFinished();
});
```
Acknowledged
teardown(function() {
appearancePage.remove();
});Unecessary. In createAppearancePage() the DOM is cleared anyway, no? Let's remove.
Done
0, appearancePage.get('prefs.bookmark_bar.visibility_state.value'));Use getPref() from the PrefsMixin to directly access pref values in TypeScript.
(Here and elsewhere)
Done
This is unnecessary. Elements accessed via `$` are expected to always exist.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This change introduces a new dropdown menu in the Appearance settings```suggestion
Introduce a new dropdown menu in the Appearance settings
```
functionality. Note: The mapping between the old and new bookmark
visibility pref is not set up.Is this done in a follow-up? Can you clarify?
<div class="flex cr-padded-text" aria-hidden="true">Why is this added?
{value: 0, name: loadTimeData.getString('bookmarksBarAlwaysShow')},Add a comment pointing out that these values need to match the C++ code for `BookmarkBarVisibilityState`. Mention the exact file.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This change introduces a new dropdown menu in the Appearance settings```suggestion
Introduce a new dropdown menu in the Appearance settings
```
Done
functionality. Note: The mapping between the old and new bookmark
visibility pref is not set up.Is this done in a follow-up? Can you clarify?
Yes, this will be done in a future CL. Link to the comment in another CL: https://chromium-review.git.corp.google.com/c/chromium/src/+/7871258/comment/3348b874_4c73a8f0/
<div class="flex cr-padded-text" aria-hidden="true">Why is this added?
I noticed `aria-hidden` is set to `true` for all dropdown menus in this page.
Below is explanation from Gemini:
`aria-hidden="true"` is required on the visible label <div> to prevent screen readers from announcing the label duplicate times.
Because settings-dropdown-menu passes its label attribute directly to `aria-label$="[[label]]"` on the interactive <select> element, a screen reader will announce "Bookmarks bar" when the user focuses the dropdown. If the visible label <div> did not have aria-hidden="true", screen readers navigating the page would read the static text "Bookmarks bar" immediately followed by the dropdown control also announcing "Bookmarks bar".
Hiding the static <div> from the accessibility tree ensures screen reader users experience a single, cleanly announced interactive control. This matches the established accessibility pattern used by every other dropdown setting on this page (such as tabStripPosition, defaultFontSize, and sidePanelPosition).
{value: 0, name: loadTimeData.getString('bookmarksBarAlwaysShow')},Add a comment pointing out that these values need to match the C++ code for `BookmarkBarVisibilityState`. Mention the exact file.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
functionality. Note: The mapping between the old and new bookmark
visibility pref is not set up.Bofeng ChenIs this done in a follow-up? Can you clarify?
Yes, this will be done in a future CL. Link to the comment in another CL: https://chromium-review.git.corp.google.com/c/chromium/src/+/7871258/comment/3348b874_4c73a8f0/
Acknowledged
<div class="flex cr-padded-text" aria-hidden="true">Bofeng ChenWhy is this added?
I noticed `aria-hidden` is set to `true` for all dropdown menus in this page.
Below is explanation from Gemini:
`aria-hidden="true"` is required on the visible label <div> to prevent screen readers from announcing the label duplicate times.Because settings-dropdown-menu passes its label attribute directly to `aria-label$="[[label]]"` on the interactive <select> element, a screen reader will announce "Bookmarks bar" when the user focuses the dropdown. If the visible label <div> did not have aria-hidden="true", screen readers navigating the page would read the static text "Bookmarks bar" immediately followed by the dropdown control also announcing "Bookmarks bar".
Hiding the static <div> from the accessibility tree ensures screen reader users experience a single, cleanly announced interactive control. This matches the established accessibility pattern used by every other dropdown setting on this page (such as tabStripPosition, defaultFontSize, and sidePanelPosition).
Acknowledged
ntpSimplificationBookmarksBarEnabled: false,Reset this to a default value in setup() so that there is no state leaking between tests.
| Commit-Queue | +1 |
Reset this to a default value in setup() so that there is no state leaking between tests.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |