1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

add folder name to aria labels for folder edit buttons (#13648)

This commit is contained in:
Jordan Aasen
2025-03-10 11:11:46 -07:00
committed by GitHub
parent a19bf1687e
commit efd62f1928
6 changed files with 26 additions and 4 deletions

View File

@@ -385,6 +385,15 @@
"editFolder": {
"message": "Edit folder"
},
"editFolderWithName": {
"message": "Edit folder: $FOLDERNAME$",
"placeholders": {
"foldername": {
"content": "$1",
"example": "Social"
}
}
},
"newFolder": {
"message": "New folder"
},

View File

@@ -19,7 +19,7 @@
slot="end"
type="button"
(click)="openAddEditFolderDialog(folder)"
[appA11yTitle]="'editFolder' | i18n"
[appA11yTitle]="'editFolderWithName' | i18n: folder.name"
bitIconButton="bwi-pencil-square"
class="tw-self-end"
data-testid="edit-folder-button"

View File

@@ -281,7 +281,7 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
},
action: this.applyFolderFilter,
edit: {
text: "editFolder",
filterName: this.i18nService.t("folder"),
action: this.editFolder,
},
};

View File

@@ -89,7 +89,7 @@
*ngIf="editInfo && f.node.id"
class="edit-button"
(click)="onEdit(f)"
appA11yTitle="{{ editInfo.text | i18n }}"
appA11yTitle="{{ 'editWithName' | i18n: editInfo.filterName : f.node.name }}"
>
<i class="bwi bwi-pencil bwi-fw" aria-hidden="true"></i>
</button>

View File

@@ -31,7 +31,7 @@ export type VaultFilterSection = {
};
action: (filterNode: TreeNode<VaultFilterType>) => Promise<void>;
edit?: {
text: string;
filterName: string;
action: (filter: VaultFilterType) => void;
};
add?: {

View File

@@ -491,6 +491,19 @@
"editFolder": {
"message": "Edit folder"
},
"editWithName": {
"message": "Edit $ITEM$: $NAME$",
"placeholders": {
"item": {
"content": "$1",
"example": "login"
},
"name": {
"content": "$2",
"example": "Social"
}
}
},
"newFolder": {
"message": "New folder"
},