Disabled ListItem inside ListView takes focus but does not show focus ring
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UX |
Fix Committed
|
High
|
Femma | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Committed
|
High
|
Zsombor Egri |
Bug Description
Items outside of a ListView are skipped when using keyboard navigation to change the focus. However, a ListItem inside a ListView takes the focus even when it is disabled, but it does not show the focus frame when focused.
For example, execute this QML program:
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
width: units.gu(50)
height: units.gu(50)
UbuntuListView {
delegate: ListItem {
Label {
}
}
model: 5
}
}
Press TAB to focus on the ListView. Then press the down-cursor-key twice to move the focus down inside the ListView. The focus will be on the disabled item, but not focus frame is visible This is confusing for the user since the focus seems to disappear, and the Item where the focus seems to be (although invisible) cannot be triggered because it is disabled.
Note: When fixing this bug, also test the solution for Horizontal ListViews (and RightToLeft and BottomToTop directions), since I encountered this bug in the scrolling toolbar (in progress) that has a Horizontal, RightToLeft ListView.
==========UX Fix===========
A disabled item should be highlighted but will not be actionable. The colour of the disabled list item with highlight on top will be enough to indicate that it is disabled. Normal focus and selection behaviour should resume for enabled list items.
Related branches
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Tim Peeters: Approve
-
Diff: 223 lines (+113/-24)5 files modifiedsrc/UbuntuToolkit/privates/listviewextensions.cpp (+22/-23)
src/UbuntuToolkit/privates/listviewextensions_p.h (+4/-0)
src/UbuntuToolkit/uclistitem_p.h (+1/-0)
src/imports/Components/1.3/UbuntuListView.qml (+5/-1)
tests/unit/visual/tst_listitem_focus_bug.13.qml (+81/-0)
description: | updated |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Confirmed |
description: | updated |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Femma (femma) |
description: | updated |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | Femma (femma) → nobody |
status: | Fix Committed → Confirmed |
importance: | Undecided → High |
Changed in ubuntu-ux: | |
status: | New → Fix Committed |
assignee: | nobody → Femma (femma) |
importance: | Undecided → High |
tags: | added: convergence |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Zsombor Egri (zsombi) |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
Is there anyway of bypassing focus for a disabled item and showing focus immediately for the next available enabled item? This way we don't end up with 'invisible focus'.