Add backup accessible name for untitled windows in window cycler.
Additional are being filed for chrome-owned pages that are untitled. Bug: b/322881931 Change-Id: I2edd8985ac0417524db83ec19db9b52601a29269 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5318959 Commit-Queue: Yulun Wu <yulunwu@chromium.org> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Cr-Commit-Position: refs/heads/main@{#1266109}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2c97aff88c
commit
70ed5a9f66
ash
@ -7038,6 +7038,9 @@ New install
|
||||
<message name="IDS_WM_RESTORE_SNAPPED_WINDOW_ON_SHORTCUT" desc="Accessibility text read by chromevox when restore a snapped window through shortcut alt+[ or alt+].">
|
||||
Active window undocked.
|
||||
</message>
|
||||
<message name="IDS_WM_WINDOW_CYCLER_UNTITLED_WINDOW" desc="Accessibility text read by chromevox when highlighting an untitled window in the window cycler.">
|
||||
Window
|
||||
</message>
|
||||
|
||||
<!-- Firmware UI notifications -->
|
||||
<message name="IDS_ASH_FIRMWARE_UPDATE_NOTIFICATION_UPDATE_AVAILABLE_TITLE" desc="Notification title to indicate to users that firmware updates are available.">
|
||||
|
@ -0,0 +1 @@
|
||||
3099021ac4116fb55672c1fb618cdf25eae0def2
|
@ -7,6 +7,9 @@
|
||||
#include <memory>
|
||||
|
||||
#include "ash/shell.h"
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "ash/wm/snap_group/snap_group.h"
|
||||
#include "ash/wm/snap_group/snap_group_controller.h"
|
||||
#include "ash/wm/window_mini_view_header_view.h"
|
||||
#include "ash/wm/window_preview_view.h"
|
||||
#include "ash/wm/window_util.h"
|
||||
@ -15,6 +18,7 @@
|
||||
#include "chromeos/ui/base/window_properties.h"
|
||||
#include "ui/accessibility/ax_node_data.h"
|
||||
#include "ui/aura/client/aura_constants.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/chromeos/styles/cros_tokens_color_mappings.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
@ -294,7 +298,15 @@ void WindowMiniView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
|
||||
}
|
||||
|
||||
node_data->role = ax::mojom::Role::kWindow;
|
||||
node_data->SetName(wm::GetTransientRoot(source_window_)->GetTitle());
|
||||
const std::u16string& accessible_name =
|
||||
wm::GetTransientRoot(source_window_)->GetTitle();
|
||||
|
||||
if (accessible_name.empty()) {
|
||||
node_data->SetName(
|
||||
l10n_util::GetStringUTF8(IDS_WM_WINDOW_CYCLER_UNTITLED_WINDOW));
|
||||
} else {
|
||||
node_data->SetName(accessible_name);
|
||||
}
|
||||
}
|
||||
|
||||
void WindowMiniView::OnWindowPropertyChanged(aura::Window* window,
|
||||
|
Reference in New Issue
Block a user