Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Individual dates not selectable via keyboard #434

Open
martygeek opened this issue Apr 17, 2018 · 4 comments
Open

Individual dates not selectable via keyboard #434

martygeek opened this issue Apr 17, 2018 · 4 comments

Comments

@martygeek
Copy link

martygeek commented Apr 17, 2018

I cannot select a date using the keyboard. We have a requirement to support accessibility and when the calendar view opens, the tab key only allows selection of the entire month. There doesn't seem to be a way, via keyboard tab key or arrow keys, to navigate between days and select a date.

Any ideas on how to make dates keyboard selectable?

@edenman
Copy link
Collaborator

edenman commented Apr 17, 2018

@martygeek I'd be open to a PR but I don't have any ideas on how to go about it. Probably best to start here: https://developer.android.com/training/keyboard-input/navigation.html

@martygeek
Copy link
Author

martygeek commented Apr 17, 2018

It should be fairly simple stuff to add. Accessibility for keyboard nav means the user should be able to direct focus to the elements on the screen using the tab or arrow keys. In xml, you can set 'android:focusable="true"' to a view and then the tab key on the keyboard will focus on that view.

@edenman
Copy link
Collaborator

edenman commented Apr 17, 2018

Sounds good, go for it.

@martygeek
Copy link
Author

since the calendar is a listview, adding that in XML might be a problem You might need 'listView.setFocusableInTouchMode(true);' or 'listView. setItemsCanFocus(true)'. You might also have to explicitly set focus on the view in the listview with android:descendantFocusability="afterDescendants"
and then listview.AddFocusables(ArrayList, int direction, int focusableMode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants