skip to Main Content

Question: Top View Controller (CardVC) not focusable with Full Keyboard Access

Issues:

  1. When CardVC is displayed, and if the Full Keyboard Access is enabled, the navigation by pressing Tab or Arrow buttons on external keyboard doesn’t cycle back to the CardVC.
  2. Initially, CardVC is highlighted (blue border to represent the focus), but pressing space key on external keyboard doesn’t result in tap event. Expected: Pressing space key should navigate to accounts settings.

Video Recording: dropbox link

View Hierarchy:

Base View Controller (Background view controller)

Card View Controller (Extended from UIViewController – custom height/width and has a gesture to dismiss upon tap on background BaseViewController)

Table view

Single cell with a button Switch Accounts.

enter image description here

Looked into:

Would welcome suggestions on how to approach Accessibility and full keyboard access related debugging.

Related:

2

Answers


  1. Chosen as BEST ANSWER

    TableViews with complicated cells are known to break the Full Keyboard Access as per the updated links in the question.

    Root cause of this issue: Cell has a button and few other views that conflicts with the focus.

    In order to resolve it, I had to simplify the cell to not contain the button Switch Accounts - this was added a few years back and caused the focus issue with Full Keyboard Access.

    Now the updated hierarchy is:

    Base View Controller (Background view controller)

    Card View Controller (Extended from UIViewController - custom height/width and has a gesture to dismiss upon tap on background BaseViewController)

    Table view

    Cell without the button switch accounts

    Switch Accounts button (Now on the same level as a sibling-view of tableView)


  2. For fixing this issue I would recommend initially setting isAccessibilityElement = false for all components within the view. This approach ensures that none of the elements are accessible by default. Subsequently, I would methodically enable accessibility for each element by setting isAccessibilityElement = true individually. This step-by-step process will help identify the specific element responsible for the issue.

    It’s important to note that not every element requires the isAccessibilityElement = true setting. Certain elements, such as buttons, are inherently accessible and have this property enabled by default. Additionally, utilizing the accessibility inspector on your computer is crucial. It provides a clearer perspective on how the inspector interprets the accessibility of each element.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search