Add HTML output #9

Closed
opened 1 year ago by tastytea · 0 comments
tastytea commented 1 year ago
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 1 year ago
tastytea referenced this issue from a commit 1 year ago
tastytea closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.