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

Allow inline feedback to be inserted before .btn__container #107

Open
hanshillen opened this issue Sep 11, 2024 · 0 comments
Open

Allow inline feedback to be inserted before .btn__container #107

hanshillen opened this issue Sep 11, 2024 · 0 comments

Comments

@hanshillen
Copy link

Currently, if you use the 'inline' type, the feedback element is appended to the component, after the question button(s) in .btn__container.

This means that when focus is moved to the feedback element on appearance, the user has to navigate backwards (e.g. shift tab for keyboard users, or backwards virtual navigation for screen reader users) to get to the 'reset' button and reset the question.

In general, requiring backwards navigation for progression is to be avoided, as it can be confusing to the user and as it's easy to miss. When dynamically updating page content, it's always good practice to to either:

  • ensure the change happens 'downstream', i.e. further down the reading order from the user's current focus.
  • manually move focus to the updated part (e.g. moving focus back to the start of the question when clicking the 'reset' button.

With this in mind, it would be good if adapt-contrib-tutor had an option that lets authors choose to have the feedback element inserted before the buttons instead. All this option would do is change view.$('.component__inner').append(new TutorView(options).$el); to view.$('.btn__container').before(new TutorView(options).$el); on line 60.

This would make the feedback be inserted like this:

Incorrect feedback, placed before reset button

Incorrect feedback, placed before 'show markings' button

Correct feedback, placed before disabled submit button

With this change, the user always moves forward: "submit question -> auto-focus feedback above reset button -> reset button -> auto-focus question title -> submit -> auto-focus feedback -> next question... etc.". The interaction flows more naturally

hanshillen added a commit to ThePacielloGroup/adapt-contrib-tutor that referenced this issue Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants