Review update of H5P Dictation to 1.0.2

Description

Acceptance Criteria

  • Provide feedback from UX review

  • Provide feedback from code review

  • Release if possible (after version bump; that's still required – and bump of core version dependency (? not sure because of the Audio Recorder Widget))

Description

There are some new features in H5P Dictation that would make for a nice update. Three of them have been proposed by VU. It was great if Jelena found some time to check the UX (not much changed here) and if someone could review the code.

The changes are:

  • Add support for right-to-left languages in the solution view (VU), but not in input fields etc. as this should be done a standardized way (via core). There's auto-detection based on unicode character sets, and Dictation can also handle mixed content containing right-to-left and left-to-right words. The auto-detection can be overridden in the behavioral settings if necessary. In the solution view, right-to-left sentences or mixed sentences will keep the original word order. Also, keyboard navigation will start at the outer right word instead of the outer left word, and home/end keys are reversed accordingly.

  • Add support for non-whitespace-languages (VU). Some languages do not use white-spaces to separate words, e. g. Chinese. There's now an option to split particular characters from one another automatically even if you don't type spaces. Still not perfect, because some words consist of multiple characters and I'd need a dictionary, but better than before. There's a behavioral setting to turn the auto-detection on and off.

  • Add support for alternate solutions per word (VU). Can be useful to e.g. accept British and American spelling, traditional and simplified Chinese, etc. Similar to Find-the-words, alternate spellings can be separated by a | (vertical line). Can be escaped if necessary. I deliberately did not choose a slash as used in Find-the-words, as the | is also used in regular expressions for the same purpose and the slash causes trouble for some purposes if I recall correctly. In the behavioral settings, you can choose if you want to display all possible alternatives in the solution view or only the first one in case of a wrong answer.

  • * Add option to remove custom styling for typos and use the regular mistake style instead. Feature requested by Dorte Nielsen.

  • Use the new Audio Recorder widget for adding sound samples.

  • Include dutch translation update contributed by Rene Breedveld

  • Fix two edge case bugs that probably nobody would have ever noticed

  • Split the huge Sentence class into Sentence and Solution (I know there's still one large function that should be refactored one day )

  • Move some functions into a general Util class.

  • Add language file for Brazilian Portuguese, contributed by Leonardo Furtado

  • Add support for save content state.

Further request: It'd be cool if https://github.com/h5p/h5p-audio/pull/17 could be reviewed and merged as well. It's not huge and would improve ARIA for h5p-audio in general, not only for Dictation.

 

Acceptance Criteria

None

Status

Assignee

Thomas Marstrander

Reporter

Oliver Tacke

Labels

Funding

None

Code reviewer

None

Released

None

Time tracking

2h

Sprint

None

Fix versions

Priority

Low
Configure