Open
Bug 1408470
Opened 8 years ago
Updated 3 years ago
Title attribute of button children not displayed
Categories
(Core :: Layout, defect, P5)
Tracking
()
UNCONFIRMED
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | wontfix |
People
(Reporter: mattcoz, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171011100133
Steps to reproduce:
Add a child to a button element and set the title attribute. Ex:
<button>
<img src="delete.png" title="Delete"/>
</button>
Actual results:
No title attribute is shown.
Expected results:
Title attribute should be shown. This is the behavior in every other browser I've tried.
Updated•8 years ago
|
Component: Untriaged → Layout
Product: Firefox → Core
Updated•8 years ago
|
We've seen this behavior as well, in the following html and many others on our page like it.
<button type="button" class=" btn btn-default">
<div id="center-justify-button" title="Center" icon="align-center" value="false" class="icon icon-align-center">
[::before inserts an icon here]
</div>
</button>
I believe this is something that should be fixed. Many buttons with icons only use tooltips to help the user recognize what the icon means when they're first using the application.
Is a possible workaround that we should try to put the title on the button itself?
Update: yes, the workaround is to move the title onto the button tag itself. Works fine Firefox 57, doesn't break 56 or Chrome.
| Reporter | ||
Comment 4•8 years ago
|
||
Yes, but that is not always the desired behavior. If the button is a toggle and the icon and title change depending on the state, then that requires changing the title on the button every time the button changes state rather than just changing the visible icon. This is complicated further on one of my sites where I have custom styled tooltips.
Updated•3 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•