Add HTML output #9

Closed
opened 2 years ago by tastytea · 0 comments
Owner

In Accessibility of Command Line Interfaces it is recommended to provide HTML output for long outputs.

“[…] it is difficult to scroll in the terminal with a screen reader. Users will have a hard time scrolling across the entire output and reading/copying all the text available to them. Being able to export this into a more accessible format like text or html would be a better user experience. This would allow them to search or navigate more quickly to the content they need.”

This might be a good structure:

<title>epubgrep output</title>

<section aria-labelledby="file_1">
  <table>
    <caption id="file_1">path/to/file.epub</caption>
    <tr>
      <th id="file_path">File path (in EPUB file)</th>
      <th id="chapter">Chapter</th>
      <th id="page">Page number</th>
    </tr>
    <tr>
      <td headers="file_path">OEBPS/file.xhtml</td>
      <td headers="chapter">The beginning</td>
      <td headers="page">14</td>
    </tr>
  </table>
</section>

It should respect the option to disable in-epub file paths, but probably ignore the option to disable file path output for the EPUB files?

I'm not so sure about using the full file path as title.

In [Accessibility of Command Line Interfaces](https://storage.googleapis.com/pub-tools-public-publication-data/pdf/8bc5640eb3c5cf22b9c5cc72647c6035d8d92fc7.pdf) it is recommended to provide HTML output for long outputs. > “[…] it is difficult to scroll in the terminal with a screen reader. Users will have a hard time scrolling across the entire output and reading/copying all the text available to them. Being able to export this into a more accessible format like text or html would be a better user experience. This would allow them to search or navigate more quickly to the content they need.” This might be a good structure: ``` html <title>epubgrep output</title> <section aria-labelledby="file_1"> <table> <caption id="file_1">path/to/file.epub</caption> <tr> <th id="file_path">File path (in EPUB file)</th> <th id="chapter">Chapter</th> <th id="page">Page number</th> </tr> <tr> <td headers="file_path">OEBPS/file.xhtml</td> <td headers="chapter">The beginning</td> <td headers="page">14</td> </tr> </table> </section> ``` It should respect the option to disable in-epub file paths, but probably ignore the option to disable file path output for the EPUB files? I'm not so sure about using the full file path as title.
tastytea added the
enhancement
label 2 years ago
tastytea referenced this issue from a commit 2 years ago
tastytea closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tastytea/epubgrep#9
Loading…
There is no content yet.