keepassxreboot / keepassxc-browser

KeePassXC Browser Extension
GNU General Public License v3.0
1.78k stars 188 forks source link

Bogus alternative text for username field icon (div.kpxc-username-icon[alt=usernameFieldIcon]) #2239

Closed Chealer closed 5 months ago

Chealer commented 5 months ago

As reported by @varjolintu, the "usernameFieldIcon" message is used. The extension alters the DOM of forms to add a KeePassXC icon. It does so by adding a shadow root with a styled div element: <div class="kpxc kpxc-username-icon unlock-moz" title="Remplir les identifiants à partir de KeePassXC" alt="Icône du champ de nom d’utilisateur" size="24" offset="7" kpxc-pwgen-field-id="null" style="z-index: 10000000; width: 24px; height: 24px; top: 277px; left: 1508px; display: block; filter: saturate(0%);"></div>

Setting the alt attribute causes 2 issues:

  1. The bogus usernameFieldIcon message ("Username field icon") is required.
  2. The HTML code is invalid (since alt does not apply to div).

This affects KeePassXC-Browser 1.9.0.5 (on Mozilla Firefox).

Solution

Do not set the alt attribute (title is already set, and already has a proper value)