Skip to content

Commit 0b9ebe7

Browse files
Adriana IxbaDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Add aria label to 3p badge
Bug:383567961 Change-Id: I65611fb6be87907d589a9f909a80b98ff3f41667 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6187821 Commit-Queue: Adriana Ixba <[email protected]> Reviewed-by: Adam Raine <[email protected]>
1 parent b9ec6d9 commit 0b9ebe7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

front_end/panels/timeline/TimelineTreeView.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ const UIStrings = {
144144
* @description Text for Match whole word button
145145
*/
146146
matchWholeWord: 'Match whole word',
147+
/**
148+
* @description Text referring to a 1st party entity
149+
*/
150+
firstParty: '1st party',
151+
/**
152+
* @description Text referring to an entity that is an extension
153+
*/
154+
extension: 'Extension',
147155
};
148156
const str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineTreeView.ts', UIStrings);
149157
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -705,13 +713,14 @@ export class GridNode extends DataGrid.SortableDataGrid.SortableDataGridNode<Gri
705713
let badgeText = '';
706714

707715
if (thirdPartyTree.nodeIsFirstParty(this.profileNode)) {
708-
badgeText = '1st party';
716+
badgeText = i18nString(UIStrings.firstParty);
709717
} else if (thirdPartyTree.nodeIsExtension(this.profileNode)) {
710-
badgeText = 'Extension';
718+
badgeText = i18nString(UIStrings.extension);
711719
}
712720

713721
if (badgeText) {
714722
const badge = container.createChild('div', 'entity-badge');
723+
UI.ARIAUtils.setLabel(badge, badgeText);
715724
badge.createChild('div', 'entity-badge-name').textContent = badgeText;
716725
}
717726
}

0 commit comments

Comments
 (0)