Closed Bug 1637536 Opened 5 years ago Closed 5 years ago

Accessibility: Subject field accessible name is never updated after the initial opened mail

Categories

(Thunderbird :: Mail Window Front End, defect)

defect

Tracking

(Accessibility Severity:s3)

RESOLVED FIXED
Thunderbird 78.0
Accessibility Severity s3

People

(Reporter: MarcoZ, Assigned: aleca)

References

(Regression)

Details

(Keywords: access, regression)

Attachments

(1 file, 1 obsolete file)

STR:

  1. Open TB.
  2. Turn off preview pane. I have it turned off because I want messages to stay unread when arrowing onto them, and only get marked read if I open them with Enter.
  3. Open the first mail.
    • The accessible name of the mail-headerfield with ID "expandedsubjectBox" receives an accessible name of "Subject: " followed by the actual subject.
  4. Close the mail with CTRL+W.
  5. Select a different mail and open it.
  6. Inspect the accessible name for the subject header field.
    • Expected: The field should read "subject" followed by the new subject.
    • Actual: The accessible name still shows the subject for the previous mail from step 3.
  7. Close and open more e-mails.
    • Result: The accessible name for the subject header field never gets updated.

Other fields such as from and to are not affected by this bug.

I suspect that something in the implementation of bug 1493608 never works beyond the first opened mail.

Setting accessibility severity to 3 in accordance with the Accessibility triage guidelines.

Severity: S3 → --

(The implementation was bug 1589859)
Alex, I guess this is because we're re-using these fields and not creating new ones. We could either generate them always, or then we need to store the aria-labelledby value we used before we remove it.

Assignee: nobody → alessandro
Regressed by: 1589859
No longer regressed by: 1493608

Again, the other fields work, only the subject field doesn't get updated. Perhaps you need to actually set the aria-labelledby again somewhere once you reuse the field? I tried tinkering with this in msgHeaderView.js, but even if I update the aria-labelledby in both the case of a new or existing field once it is all set up, it doesn't work in my local build.

Thanks for the detailed report.
I'll work on it.

Status: NEW → ASSIGNED
Attached patch 1637536-subject-aria.diff (obsolete) — Splinter Review

Apparently, the subject field is not recreated when a new message pane is opened, even if the previous one is closed.
Since we were removing the aria-labelledby attribute to prevent hierarchy issues with the dynamically set aria-label, that attribute wasn't available anymore in any other message panel, therefore the previous value set in the subject aria was remaining.

I fixed the issue by fetching the value from the label[control="id"] element, which we don't need to remove.

The other fields don't present this problem since are dynamically generated.

Attachment #9148102 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9148102 [details] [diff] [review] 1637536-subject-aria.diff Review of attachment 9148102 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/content/mailWidgets.js @@ +47,5 @@ > > set headerValue(val) { > // Solve the accessibility problem by manually fetching the translated > // string from the label and updating the attribute. Bug 1493608 > + let label = document.querySelector(`label[control="${this.id}"]`); I don't know about this. It could be expensive, and there really is (in theory) any requirement the id to be set at all. @@ -52,5 @@ > - let ariaLabel = document.getElementById( > - this.getAttribute("aria-labelledby") > - ); > - this.setAttribute("aria-label", `${ariaLabel.value}: ${val}`); > - this.removeAttribute("aria-labelledby"); I would suggest to here, just stash this on the object before removing the attribute. Like this._ariaBaseLabel = ariaLabel; Then check for that attribute and use it as needed next time
Attachment #9148102 - Flags: review?(mkmelin+mozilla)

Sounds good, thanks for the review and suggestion. I'll fix this right away

Attachment #9148102 - Attachment is obsolete: true
Attachment #9148181 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9148181 [details] [diff] [review] 1637536-subject-aria.diff Review of attachment 9148181 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thx! r=mkmelin
Attachment #9148181 - Flags: review?(mkmelin+mozilla) → review+
Target Milestone: --- → Thunderbird 78.0

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/1950b809c989
Fix aria-label not updating the Subject field in the message header. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Accessibility Severity: --- → s3
Whiteboard: [access-s3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: