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

Arrow keys for navigation of HTML output #433

Closed
rbeezer opened this issue Nov 7, 2016 · 19 comments
Closed

Arrow keys for navigation of HTML output #433

rbeezer opened this issue Nov 7, 2016 · 19 comments

Comments

@rbeezer
Copy link
Collaborator

rbeezer commented Nov 7, 2016

Readers (students) have requested that the keyboard arrow keys might function like the prev and next buttons. Maybe this is a CSS/Javascript function, or maybe something MBX should write out. Maybe this would be an accessibility improvement?

Maybe check that the MathJax accessibility functions don't get clobbered.

@rbeezer
Copy link
Collaborator Author

rbeezer commented Nov 8, 2016

@Alex-Jordan
Copy link
Contributor

If the buttons for prev/up/next had HTML id's, then some javascript could bind the left, up, and right arrow keys to these buttons.

http://www.codingforums.com/javascript-programming/220575-control-web-page-buttons-arrow-keys.html

@davidfarmer
Copy link
Contributor

davidfarmer commented Apr 2, 2017 via email

@Alex-Jordan
Copy link
Contributor

So, I looked up that link, and almost posted what I composed as a new issue before I found this one existed. I pasted it here before following Rob's link, and it may be better.

I'm interested in "left/right", not so much "up". Red flags go up when I think about "up", because maybe that is the usual way to scroll up when keyboard navigating.

So I should ask accessibility staff about it.

Are we opposed to putting js directly into pages, even when it is very concise like this would be?

@davidfarmer
Copy link
Contributor

davidfarmer commented Apr 3, 2017 via email

@rbeezer
Copy link
Collaborator Author

rbeezer commented Apr 3, 2017 via email

@Alex-Jordan
Copy link
Contributor

Alex-Jordan commented Apr 3, 2017 via email

@rbeezer
Copy link
Collaborator Author

rbeezer commented Apr 3, 2017 via email

@davidfarmer
Copy link
Contributor

davidfarmer commented Apr 3, 2017 via email

@rbeezer
Copy link
Collaborator Author

rbeezer commented Apr 3, 2017

I've added id=previousbutton, id=upbutton and id=nextbutton to the HTML output. I added them to the "disabled" versions of the buttons as well. Let me know if that causes problems or needs to change and we can adjust. I'll update the sample article online once home tonight.

50a9398

Rob

@Alex-Jordan
Copy link
Contributor

I had not pulled mathbook in a while. Now I get lots of these when making html:

element span: validity error : ID previousbutton already defined
element span: validity error : ID upbutton already defined
element a: validity error : ID nextbutton already defined
element a: validity error : ID previousbutton already defined
element a: validity error : ID upbutton already defined
element a: validity error : ID nextbutton already defined
element a: validity error : ID previousbutton already defined
element a: validity error : ID upbutton already defined
element a: validity error : ID nextbutton already defined
element a: validity error : ID previousbutton already defined
element a: validity error : ID upbutton already defined
element a: validity error : ID nextbutton already defined
...

I believe that we have seen this kind of thing before, and the reason I see it and Rob (I'm guessing) does not is either a Mac/Linux difference or a version difference in xsltproc. I don't remember how to address it though...

@rbeezer
Copy link
Collaborator Author

rbeezer commented Apr 9, 2017 via email

@Alex-Jordan
Copy link
Contributor

Alex-Jordan commented Apr 9, 2017 via email

@Jahrme
Copy link

Jahrme commented Apr 9, 2017

It appears possible to move the buttons using CSS. I found a simple example here (on StackOverflow) of moving a div to the top or bottom of the view depending upon the screen size.

(Not saying that the linked method would be ideal for our purpose, simply that it is possible.)

@davidfarmer
Copy link
Contributor

davidfarmer commented Apr 10, 2017 via email

@rbeezer
Copy link
Collaborator Author

rbeezer commented Apr 10, 2017 via email

@rbeezer
Copy link
Collaborator Author

rbeezer commented Apr 10, 2017 via email

@Alex-Jordan
Copy link
Contributor

Alex-Jordan commented Apr 10, 2017 via email

@Alex-Jordan
Copy link
Contributor

Alex-Jordan commented Apr 10, 2017 via email

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

No branches or pull requests

4 participants