Open Bug 595166 Opened 15 years ago Updated 3 years ago

Implement XUL disabledreason attribute.

Categories

(Core :: XUL, enhancement)

enhancement

Tracking

()

People

(Reporter: CodeMachine, Unassigned)

Details

Sensible UI design suggests that users should be able to mouseover disabled elements and get a tooltip indicating the reason for the element being disabled. I suggest that having an explicit feature for this would be a good idea. That is, when the element is disabled, a disabledreason attribute becomes the tooltip rather than tooltiptext or tooltip. This text would be different from the normal tooltiptext, so having this as a feature would let both attributes be easily obtained from DTD entities, achieving consistency. It would be much easier to write code that did the right thing, which should improve the quality of Mozilla apps and their extensions. When you don't have this, you need to have the disabledreason in a property, and overwrite the tooltiptext. However there's no easy way to get the old text back. Which means you must have everything in properties and code rather than in the XUL, which is really kludgy. It might also ensure things like bug #595161 don't occur. To be sure this wouldn't be perfect, in particular if there were multiple possible values of disabledreason, you'd still need to pull them from properties probably. But this is probably not a common case, and the normal tooltiptext can still be in XUL without being overwritten, and even that would make things easier. I would probably expect that in the situation of hierarchy, the outermost such reason would win out.
Version: 1.9.2 Branch → Trunk
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.