Can't scroll lobby, department, or software item screens with the keyboard

Bug #635994 reported by Matthew Paul Thomas on 2010-09-11
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
High
Unassigned
Natty
Undecided
Unassigned

Bug Description

Ubuntu Software Center 2.1.18.1, Ubuntu Maverick
software-center-gtk3 trunk 2114, Ubuntu Ocelot

1. Launch Ubuntu Software Center.
2. Press Tab to focus the main pane.
3. Press the Down key.

What happens: In 2.18.1, "Fonts" is focused. In r2114, nothing happens at all.
What should happen: The main pane scrolls down.

This is an accessibility problem because it prevents people from getting to all the features, reading the full description etc., unless they can use a pointing device.

Related branches

description: updated
Changed in software-center (Ubuntu):
importance: Undecided → Medium
Changed in software-center (Ubuntu):
importance: Medium → High
Matthew McGowan (mmcg069) wrote :

Page Down works.

IMHO the viewable region should track the focused widget when using the keyboard.

Matthew McGowan (mmcg069) wrote :

I have a branch demoing this idea, see: lp:~mmcg069/software-center/focus-tracking

To test:
1. Reduce the window to as narrow as possible
2. Press the down arrow and focus-cycle through lobby widgets

Should see the scrolledview visible region follow the focus.

The same applies to the detailsview, however due to some mysterious segfaults the focus-tracking isn't as comprehensive as i would have liked, but i think i go the important ones covered.

See what you think.

Matthew Paul Thomas (mpt) wrote :

Thanks for that branch -- it looks like a good fix to bug 620506. :-)

However, it's not really related to this bug, because this bug includes scrolling to things that *aren't* focusable. For example, the "Total size", "Version", "License", and "Updates" lines aren't focusable, and should not be focusable. But you should still be able to scroll the pane with the keyboard to read them.

This might be my fault, I guess, because for version 1 I asked that the arrow keys work for focusing the departments in the lobby screen (which rarely scrolled anyway), and you were copying that behavior with the GTK version. But it doesn't work so well in the software item screen, and it won't work so well if we add unfocusable elements to the bottom of the lobby screen in future versions. It also has an unpleasant side effect on both screens: if you're on a leftmost item and press Left, you end up in the navigation pane, where pressing neither Left nor Right will get you out again (it collapses or expands the selected branch instead).

So, one option is for us to retire the arrow-key focusing, leaving that job to Tab and Shift Tab, and instead use arrow keys solely for scrolling.

A more complex option is to behave a bit like the Elinks browser, where the arrow keys change focus if there's anything focusable within range in that direction, and if there isn't they just scroll.

Matthew Paul Thomas (mpt) wrote :

This morning I helped Matthew test his lp:~mmcg069/software-center/page-key-scrolling branch on a software item screen. These are the salient revisions:

r1201
    No matter how long you hold down the Up or Down keys, it scrolls only one step, on key up.
    Odd highlighting of "Total size", "Version", "License", and "Updates" values when tabbed to.
    Contains console output to help debug key events.

r1195
    The same as r1201, but without the console output, and ignores Page Up or Page Down.

r1194
     Properly keeps scrolling when you hold down the Up or Down keys.
     Incorrectly scrolls two steps no matter how quickly you press Up or Down (once on key down, once on key up).
     Odd highlighting not just of "Total size" etc, but also of individual paragaphs in the description. (Matthew and I amicably disagree about whether that's better than not showing at all that the paragraphs are focused.)

Matthew Paul Thomas (mpt) wrote :

Still a problem in 3.1.23.3. Now an ugly caret appears at the start of the description for a software item even when you haven't tried to scroll, and the Up and Down keys do nothing except navigate that caret through the description.

Ricardo Cruz (rpmcruz2) wrote :

Hi guys. I had a similar problem in a GTK application I worked on. I had a scrolled-window under which I had several GtkTextView, some of which under containers. Here is an excerpt of how I tackled the problem. I just "mapped" any keys pressed in one of those GtkTextView to the top GtkScrolledWindow. (The two hard-coded constants are straight from the GTK code.)

Matthew McGowan (mmcg069) wrote :

@Ricardo

Nice idea. At the moment the Up/Down keys are mapped to traverse the focus-chain.

I am imagining the simplest way to fix this bug would be to intercept the key-press-event or key-release-event for the ScrolledWindow or Viewport (i am guessing here), and if the keyval is of Up/Down then tweak the adjustment (much like your example) and consume the event so it is not handed on to other widgets lower in the widget hierarchy.

The consequence of this approach would be that the Tab key would become the only way to traverse the focus-chain (maybe also the Left/Right keys?).

mpt if you are ok with this i think it would not be a difficult thing to implement.

Matthew McGowan (mmcg069) wrote :

Hi,

I have linked to a new branch which does what i have suggested in the above reply. Only applies thus far to the detailsview widget but easy to implement in the lobbyview if this is the desired solution.

Cheers

Michael Vogt (mvo) wrote :

Thanks Matthew and Ricardo, that looks good (nice and elegant).

Changed in software-center (Ubuntu):
status: New → In Progress
Matthew Paul Thomas (mpt) wrote :

Yes, I think it's fine for Tab/Shift+Tab to be the only way to navigate through focusable elements, with arrow keys doing only scrolling. It's the same in most Web browsers.

Accepted software-center into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in software-center (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed

SRU verification for Natty:
I have reproduced the problem with software-center 4.0 in natty and have verified that the version of software-center 4.0.1 in -proposed partially fixes the issue.

The arrow keys can now be used to scroll the description but still navigate through the items on the main view. The user can scroll with PgUp/PgDown keys though.

Marking as verification-done because it is an improvement over the previous version.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 4.0.1

---------------
software-center (4.0.1) natty-proposed; urgency=low

  [ Michael Vogt ]
  * debian/control:
    - point to 4.0 bzr branch
  * merged lp:~mmcg069/software-center/Bug635994, many thanks
    (LP: #635994)
  * utils/submit_review.py:
    - fix missing translation (LP: #770439)
  * utils/submit_review.py:
    - improve logging on SSO failure (LP: #773214)
    - do not translate "appname" as ubuntu-sso-login will fail
      for translated names with utf8 chars (LP: #773214)
  * softwarecenter/db/reviews.py:
    - apply review sorting (LP: #773289)
  * softwarecenter/app.py:
    - do not translate "appname" as ubuntu-sso-login will fail
      for translated names with utf8 chars (LP: #773214)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/translation-fixes-lp770439:
    - fix translation not showing up (LP: #770439)
  * softwarecenter/view/appdetailsview_gtk.py,
    softwarecenter/view/widgets/reviews.py,
    test/test_appdetails_view.py:
    - enable writing a review immediately after the package
      installation is complete, add test case (LP: #769439)
 -- Michael Vogt <email address hidden> Fri, 29 Apr 2011 16:40:32 +0200

Changed in software-center (Ubuntu Natty):
status: Fix Committed → Fix Released
Gary Lasker (gary-lasker) wrote :

I'll keep this one open in Oneiric in case we want to go further with the fix.

Changed in software-center (Ubuntu):
status: In Progress → Triaged
description: updated
tags: added: a11y
Changed in software-center (Ubuntu):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :
Download full text (3.2 KiB)

This bug was fixed in the package software-center - 4.1.23.5

---------------
software-center (4.1.23.5) oneiric; urgency=low

  [ Robert Roth ]
  * Fix inconsistent colors in banner (LP: #855417)
  * softwarecenter/db/debfile.py,
    softwarecenter/ui/gtk3/views/appdetailsview_gtk.py:
    - display total size in the details view for standalone
      deb files (LP: #851222)
  * softwarecenter/db/database.py:
    - restore support for custom list searches
      (LP: #835069, LP: #828281)

  [ Kiwinote ]
  * correctly index desktop files which refer to packages for which we must
    install a version for a foreign architecture (eg skype)
  * softwarecenter/backend/reviews.py:
    - allow us to write reviews for apps with unicode appname (LP: #856052)

  [ Matthew McGowan ]
  * lp:~mmcg069/software-center/tweaks:
    - mak the avg-rating label white when a row is selected
    - TextBlock.set_visible_window to False. add a css comment
  * lp:~mmcg069/software-center/bug635994-again:
    - make the up/down -arrow behaviour available to both
      detailsview_gtk and the catview_gtk (LP: #635994)
  * lp:~mmcg069/software-center/re-fixes:
    - additional fixes for the detailsview

  [ Gary Lasker ]
  * softwarecenter/ui/gtk3/panes/availablepane.py,
    softwarecenter/ui/gtk3/panes/softwarepane.py:
    - prevent potential crash at startup if views have not yet
      been created on a call to refresh_apps (LP: #855622)
  * softwarecenter/ui/gtk3/panes/availablepane.py,
    softwarecenter/ui/gtk3/panes/installedpane.py:
    - consolidate spinner code, add timeout mask for installed
      view spinner
  * softwarecenter/ui/gtk3/panes/softwarepane.py:
    - display spinner while changing list view sort method
  * softwarecenter/ui/gtk3/app.py:
    - display spinner while loading previous purchases list
  * softwarecenter/ui/gtk3/widgets/actionbar.py:
    - fix regression in action bar button alignment (LP: #856872)
  * softwarecenter/ui/gtk3/panes/availablepane.py:
    - restore action bar functionality for custom lists
      (LP: #835069)
    - don't hide technical items during a custom list search
    - restore custom list search using apt url syntax (LP: #828281)
  * softwarecenter/ui/gtk3/dialogs/__init__.py:
    - fix crash when showing error dialog (LP: #842678)

  [ Didier Roche ]
  * lp:~didrocks/software-center/new-oneconf-sync-signal:
    - enable getting a last sync accurate date as soon as the sync
      is done (LP: #855345)

  [ Michael Vogt ]
  * utils/submit_review_gtk3.py:
    - setup logging from the helper to xdg
      ~/.cache/software-center/reviews-helper.log
  * utils/submit_review_gtk3.py, softwarecenter/ui/gtk3/views/appview.py:
    - use Gtk.ComboBoxText.new() instead of Gtk.ComboBoxText(). This makes
      get_active_text() actually work on the combobox (LP: #856429)
  * softwarecenter/utils.py:
    - fix writing new config before using it (LP: #827527)
  * softwarecenter/backend/reviews.py:
    - write out the review stats in a C friendly bsddb so that unity
      can use it too (thanks to Mikkel Kamstrup)
  * softwarecenter/ui/gtk3/panes/availablepane.py:
    - fix endless recursion (LP: #851671)
 -- Michael Vogt <michael.v...

Read more...

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers