Skip to content

Commit

Permalink
Merge pull request #19637 from calixteman/bug1952571
Browse files Browse the repository at this point in the history
[Editor] Add an aria label to an added signature (bug 1952571)
  • Loading branch information
calixteman authored Mar 10, 2025
2 parents febf59c + b5a7b82 commit d008452
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/display/editor/signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ class SignatureEditor extends DrawingEditor {
const { outline } = (this.#signatureData = data);
this.#isExtracted = outline instanceof ContourDrawOutline;
this.#description = description;
this.div.setAttribute("aria-label", description);
let drawingOptions;
if (this.#isExtracted) {
drawingOptions = SignatureEditor.getDefaultDrawingOptions();
Expand Down
5 changes: 5 additions & 0 deletions test/integration/signature_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ describe("Signature Editor", () => {
`.altText.editDescription[title="Hello World"]`
);

// Check the aria label.
await page.waitForSelector(
`${editorSelector}[aria-label="Hello World"]`
);

// Edit the description.
await page.click(`.altText.editDescription`);

Expand Down

0 comments on commit d008452

Please sign in to comment.