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

prompt improvement #31

Merged
merged 8 commits into from
Jan 26, 2024
Merged

prompt improvement #31

merged 8 commits into from
Jan 26, 2024

Conversation

tonyfast
Copy link
Member

@tonyfast tonyfast commented Jan 17, 2024

the input and output prompts need to be testing to understand the best experience for screen readers and assistive technology. since we still need to test this feature then everything needs to be configurable.

the input and output prompts are legacy features in the jupyter notebook. their text form is meant to mimic code that could be used to access the values. In[20] could be used as an expression to retrieve the 20th input from a list of imports; this is similar to Out[20] which retrieves the 20th output from a dictionary if it exists. In/Out are short hand for Input/Output and would like need access to internationalization the similarity in the prompt's itemgetter forms allows readers to visually acknowledge that indeed an input and output correspond. ultimately, our notebook implementation should make this distinction semantically. these In/Out patterns are found in nearly all linear notebook implementations which is anything based on the notebook server model. observable notebooks that obey topological ordering don't have ordinal prompts rather they have nominal prompts.

the goal of the templates we are working on is to set the baseline accessible reading state for notebooks. then progressive enhancements would transform the document to an interactive document. In/Out are interactive programming features that indicate the last state of the document when it was saved. In a reading mode, the programmatic nature of the prompts of the doesn't matter as much. The ordering is important in verifying that a notebook does not have hidden states from out of order computation. For readers the containing brackets or braces matter less. This may indicate that prompts brackets/braces could be redundant indicator for active/inactive notebooks.

also: what should the behavior of the brackets be for the prompts? brackets in prompts are announced, but should they be?

Copy link

@tonyfast
Copy link
Member Author

keeping configurability in mind, the first solution i tried was to use the a css solution using the content property. i wanted to hide the delimiters from the screen reader by putting the content inside of a aria-hidden element. it turns out that the accName computation is inconsistent under these conditions.

one of the things hindering this approach is the effect on the summary shadowDom is making computation in consistent.

it is likely that removing the details tag is our best approach. we are not really gaining an significant meaning from the inputs and outputs details. it would be better to just hander minimization ourselves.

@tonyfast
Copy link
Member Author

#33 add handling for unexecuted outputs by hiding the prompts when they don't exist.

@tonyfast tonyfast merged commit 8e268ee into main Jan 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant