Closed Bug 1721352 Opened 3 years ago Closed 3 years ago

Convert composition field role=button xul:label elements to html:button

Categories

(Thunderbird :: Message Compose Window, task)

Tracking

(thunderbird_esr78 unaffected, thunderbird_esr91 wontfix, thunderbird91 wontfix)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird_esr91 --- wontfix
thunderbird91 --- wontfix

People

(Reporter: henry-x, Assigned: henry-x)

References

(Regression)

Details

Attachments

(8 files)

Its advisable to use semantic elements for a given role where possible, and style them to match a desired look. This way, additional (accessibility) behaviour associated with the element will be carried over.

For instance, the current <xul:label role="button"> elements used to reveal additional composition fields (CC, BCC, Reply-To etc) are not activated with a Space keyboard press, unlike <html:button>.

Tracking for 91 if we manage to do this change without touching the strings.

Summary: Convert composition field role=button xul:label elements → Convert composition field role=button xul:label elements to html:button

(In reply to Alessandro Castellani [:aleca] from comment #1)

Tracking for 91 if we manage to do this change without touching the strings.

Unfortunately there isn't a way to do this. The "To", "CC" and "BCC" <xul:label role="button"> fluent entries use .value and .tooltiptext, and this would need to change to the textContent and .title respectively, which requires a new fluent id.

You could also create a migration file that migrates the strings to the correct entities: https://searchfox.org/comm-central/source/python/l10n/tb_fluent_migrations. FX has a lot of examples too.

(In reply to Richard Marti (:Paenglab) from comment #3)

You could also create a migration file that migrates the strings to the correct entities: https://searchfox.org/comm-central/source/python/l10n/tb_fluent_migrations. FX has a lot of examples too.

Thanks, I did not know about migration files. I'll look into it.

They are mostly to migrate dtd and properties to ftl but also changes of entities in ftl should work.

For what I know, string migrations are not run often but only rarely, on specific times, and all together by the m-c folks.
Unless we moved to something more independent in the past year, it's better to not think about migrations and focus on the bug first.
We can always uplift to a point release of 91 if it's necessary and we can easily migrate strings.

Also changed the representation of the extra buttons from a xul:panel to a menupopup.

Also removed the (already broken) arrow key navigation between the main buttons and the extra buttons, since the latter set are no longer semantically buttons and keyboard navigation between buttons and the internals of a popup menu would be confusing.

Also tidied up some existing approaches used for the address rows.

Assignee: nobody → henry
Status: NEW → ASSIGNED

The browser_sendButton.js is failing on macOS. That failure doesn't seem related to the currently reported perma-fails.

Attached image menupopup.png

This is getting better, but we need some polish.
Attached you can find the screenshot with a comparison.

  • Since this menu items won't show an image nor a checkmark, we don't need that space to the left. We should create a class to override this.
  • The margin inline of the menuitems is a bit too large and it creates a visual variation with the margin above and below the items. (This affects also the folder pane popup, so not directly related tot his bug)
  • The order of the menuitems is not correct.
    Reply-to, Newsgroup, Followup-To, *others, is the correct default order that should be kept.
    Once the identity is changed and those items are shuffled to reflect the different available headers, the order doesn't matter that much, but the Reply-to should always be the first since it's always the consistently available addressing field.
  • Added the address-row-input class to more clearly find the non-pill inputs of a row.
  • Stopped duplicating the address row's recipienttype information in its inputs.
  • Added the address-row-raw class to mark additional raw headers, that do not use pills.
  • Dropped the unnecessary addressingWidgetItem class, since address-row is sufficient.

Drop operation is now successfully cancelled when dropping on a custom raw address header.

Depends on D122615

Rename emphasises that this method will shift focus, and we can drop the label argument since the recipienttype data on the row is sufficient to find it.

Depends on D122617

Keywords: leave-open
Target Milestone: --- → 93 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/655c13cf015c
Clean up usage of address row and input classes. r=aleca
https://hg.mozilla.org/comm-central/rev/231af778c21d
Prevent dropping pills in raw address inputs. r=aleca
https://hg.mozilla.org/comm-central/rev/66bc5953481d
Sanitise header names in mail.compose.other.header preference. r=aleca
https://hg.mozilla.org/comm-central/rev/e0a5948d0790
Replace showAddressRow with showAndFocusAddressRow. r=aleca
https://hg.mozilla.org/comm-central/rev/56fd87c2a30a
Reduce code reuse in CompFields2Recipients. r=aleca
https://hg.mozilla.org/comm-central/rev/da77ce116ee9
Change some methods to act on address rows. r=aleca
https://hg.mozilla.org/comm-central/rev/45d336c01d5f
Replace "show address row" xul labels with buttons and menuitems. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Regressed by: 1772000
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: