[A11y] Fix picker indicator crash
Bug: 407216777 Change-Id: I9de347a74ce4f147b0fed878f210a1eff6c55327 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6439258 Commit-Queue: David Baron <dbaron@chromium.org> Auto-Submit: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#1444179}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
aa642c3cb7
commit
ab462602ed
@ -157,13 +157,15 @@ AXObject* PickerIndicatorElement::PopupRootAXObject() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PickerIndicatorElement::SetAXProperties() {
|
void PickerIndicatorElement::SetAXProperties() {
|
||||||
|
if (!picker_indicator_owner_) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setAttribute(html_names::kTabindexAttr, AtomicString("0"));
|
setAttribute(html_names::kTabindexAttr, AtomicString("0"));
|
||||||
setAttribute(html_names::kAriaHaspopupAttr, AtomicString("menu"));
|
setAttribute(html_names::kAriaHaspopupAttr, AtomicString("menu"));
|
||||||
setAttribute(html_names::kRoleAttr, AtomicString("button"));
|
setAttribute(html_names::kRoleAttr, AtomicString("button"));
|
||||||
setAttribute(
|
setAttribute(
|
||||||
html_names::kTitleAttr,
|
html_names::kTitleAttr,
|
||||||
AtomicString(
|
AtomicString(picker_indicator_owner_->AriaLabelForPickerIndicator()));
|
||||||
this->picker_indicator_owner_->AriaLabelForPickerIndicator()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PickerIndicatorElement::IsPickerIndicatorElement() const {
|
bool PickerIndicatorElement::IsPickerIndicatorElement() const {
|
||||||
|
Reference in New Issue
Block a user