I've come across what I think may be a bug while styling the 'tabs' that first (I think) appeared in Glossary but now are used in Quiz and probably a few other areas.
The problem is with tabs that are classed as inactive
. All tabs are either active
, meaning you can click on them to take you to another tab, selected
in which case they are the current tab, are highlighted and aren't linked, or inactive
which effectively means you can't click on them as they are not links but is used in two very different situations.
In Glossary, where you might be waiting for people to add entries for you to approve, the "waiting for approval" tab remains
inactive
until there is actually something to approve.In Quiz there are submenus of tabs. Clicking on the "reports" tab displays another row of three tabs below it. The "reports" tab now becomes
inactive
as you can't click it, but it is actually closer in kind toselected
as it is now a heading for the sub-tabs.
Possibly because of this confusion the standard theme tabs seem to fall between two stools and the inactive
tabs look neither particularly disabled, nor particularly highlighted.
Obviously this situation would be even worse if inactive tabs and sub-tabs were combined in one set of tabs.
potential solutions
Change Glossary so that it no longer conveys state via the tabs. The "waiting for approval" tab will always be
active
and if you click on it when there are no pending definitions it will say so. (If some more pro-active notification is needed then just some text saying "x definitions awaiting approval" could do the same job)Change Quiz so that tabs with submenus are classed as something else,
selected
would probably work but maybe another state entirely would be best to allow for different styling opportunities.
I think either of these alone would fix the problem, but probably both should be implemented. Simply disabling a tab doesn't give that much information. A tab that said "no-one has submitted any definitions yet" gives far more information about how to proceed. Okay, in that example it's fairly obvious but there may be other occasions when a tab is inactive
and it's not so obvious what the user should do to change that state of affairs.