1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Merge pull request #19637 from calixteman/bug1952571

[Editor] Add an aria label to an added signature (bug 1952571)
This commit is contained in:
calixteman 2025-03-10 20:44:42 +01:00 committed by GitHub
commit d008452e80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -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();

View file

@ -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`);