OCA / web

Odoo web client UI related addons
GNU Affero General Public License v3.0
896 stars 1.84k forks source link

Keyboard accessibility problems in web_responsive #1830

Open SplashS opened 3 years ago

SplashS commented 3 years ago

Migrating web_responsive from 13 to 14 I faced some problems in keyboard accessibility. Due to this is not migration issue I collected all my finds here.

  1. Alt + Shift + A for Apps Menu doesn't work on Chrome. This is because KeyboardNavigationMixin does "nothing" on Chrome and lets browser process shortcuts by itself. Chrome doesn't support all acesskeys. My investigations show that combinations Alt + Shift + [A, B, I, T] and Alt + [E, F, D] don't work on Chrome (Windows). So the simplest way is to pick up new letter for Apps Menu.
  2. KeyboardNavigationMixin has the ability to automatically assign acesskeys to buttons. We should extend this functionality to exclude not working shortcuts (Alt + Shift + [A, B, I, T]) from being used as auto accesskeys.
  3. There are some interlapping accesskeys. My find is A accesskey used for both Apps Menu and Activity view in SwitchView. This may be fixed when we pick up different letters for both buttons due to Alt + Shift + A doesn't work on Chrome (but Alt + A does so it's not upsream problem).
  4. web_responsive overrides Edit accesskey from A to E and Discard accesskey from J to D, but not in all places. F.x. these buttons in editable list view not overwritten. We should verify all accesskey overrides.
  5. Shortcuts help shows that control keys on Windows are Alt + Shift, but accesskeys not overwritten in help. F.x. for Edit shown A, but works E and so on. We should make help consistent.

So let's think if the juice is worth the squeeze :) May be we should fall back to upstream Alt + behavior?

pedrobaeza commented 3 years ago

For the last question, a big NO for me. It's a pain to have Alt+number that I use for switching between tabs in Firefox to get overwritten by Odoo an avoiding me to perform it. Each time a open a runbot is like a kick in...

SplashS commented 3 years ago

I made some realistic accesskeys transformation. It can be implemented. I don't know how to deal with App Menu except to leave H accesskey for it. I can add both shortcuts A and H but it strange behavior and can affect translation strings. All other looks good for me: To Alt + Shift + 'E' from Alt + 'A' // Odoo Edit (I think A was used cause Alt + E doesn't work on Chrome) To Alt + Shift + 'A' from Alt + 'A' // Odoo Activity view (it won't work on Chrome, but it's rarely used) To Alt + Shift + 'Q' from Alt + 'B' // Odoo Previous Breadcrumb (Back, Quit) (Alt + Shift + B doesn't work on Chrome) To Alt + Shift + 'C' from Alt + 'C' // Odoo Create To Alt + Shift + 'H' from Alt + 'H' // Odoo Home (aka Apps menu) (Alt + Shift + A doesn't work on Chrome) To Alt + Shift + 'D' from Alt + 'J' // Odoo Discard (I think J was used cause Alt + D doesn't work on Chrome) To Alt + Shift + 'K' from Alt + 'K' // Odoo Kanban view To Alt + Shift + 'L' from Alt + 'L' // Odoo List view To Alt + Shift + 'N' from Alt + 'N' // Odoo pager Next To Alt + Shift + 'P' from Alt + 'P' // Odoo pager Previous, also website Publish / Unpublish To Alt + Shift + 'S' from Alt + 'S' // Odoo Save To Alt + Shift + 'F' from Alt + 'Q' // Odoo Search, Find (I think Q was used cause Alt + F doesn't work on Chrome) To Alt + Shift + 'V' from Alt + 'V' // Odoo website mobile preview To Alt + Shift + 'W' from Alt + 'W' // Odoo website multiwebsite switch

SplashS commented 3 years ago

I've looked other issues and found some connections.

  1. When #1435 be implemented Alt + Shift + H (Home) will be more consistent for Apps Menu :)
  2. Alt + Shift + I was already reported in #1737. It affects 13.0 and earlier. In 14.0 there is no Import accesskey.