Skip to content

Screen reader mode #351

@epage

Description

@epage

This is dependent on cargo/rustc wanting it

Users of applications that use miette can get a screen reader mode for diagnostics using NO_GRAPHICS=1. (source)

oops!
    Diagnostic severity: error
Begin snippet for bad_file.rs starting at line 1, column 1

snippet line 1: source
snippet line 2:   text
    label at line 2, columns 3 to 6: this bit here
snippet line 3:     here
diagnostic help: try doing it better next time?
diagnostic code: oops::my::bad

The idea of making output compatible with screen readers seems beneficial

We likely wouldn't bake NO_GRAPHICS directly into annotate-snippets like miette does but instead have the API for it with that being controlled by

  • --error-format flag in rustc
  • term.<something> in cargo (which maybe could also read NO_GRAPHICS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions