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

Express semantics of Glk styles for screen readers #20

Open
curiousdannii opened this issue Jul 2, 2022 · 0 comments
Open

Express semantics of Glk styles for screen readers #20

curiousdannii opened this issue Jul 2, 2022 · 0 comments

Comments

@curiousdannii
Copy link
Owner

curiousdannii commented Jul 2, 2022

The Glk styles have inherent semantics, but that is completely lost in WebGlkOte, and any visual representation of those styles is not accessible somewhat cumbersome to those using screen readers. But it might be possible to wrap the current output of <span>s with HTML elements that express the meaning of the Glk styles. We would have to carefully ensure that any default CSS properties for these elements are reset, as well as making them all inline. So for example, here is how the subheader style, used for a room description, could be output:

<h3><span class="Style_subheader">Kitchen Garden</span></h3>

Current interpreters like ZVM misuse some of these Glk styles for purely visual formatting. But we could add a Glk extension to allow for broader CSS properties to be set so that ZVM can just say "make this text bold and italic", and then the Glk styles of "headers" and "blockquotes" etc wouldn't be used in weird situations.

Possible ways of expressing the Glk semantics:

Glk style HTML
Normal none
Emphasized <em>
Preformatted <pre>?
Header <h2>
Subheader <h3>
Alert role="alert"
Note ?
Blockquote <blockquote>
Input <kbd>?
User1 none
User2 none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant