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

Choose how to handle auto-insertion of terminal periods #105

Open
matt-dray opened this issue Nov 8, 2023 · 0 comments
Open

Choose how to handle auto-insertion of terminal periods #105

matt-dray opened this issue Nov 8, 2023 · 0 comments
Labels
accessibility Meeting the guidelines discuss Point for discussion documentation Improve or add documentation enhancement New feature or request should MoSCoW priority
Milestone

Comments

@matt-dray
Copy link
Collaborator

Currently, a terminal period will be added to strings in the blank_cells and source columns of an a11ytable-class object if they're missing. For example: Some text is converted to Some text., and Some text. remains as Some text..

The presence of hyperlinks (#47) complicates this. [Some text]() should become [Some text.](). We can detect the presence of a hyperlink in the string and take action if one is found. In this case, we can replace [^\.]\]\( (anything but a period, followed by close-square bracket and open parenthesis) with \.\]\(. What to do if the user provdes the string Here is [some text]() to consider.? It might convert to Here is [some text.]() to consider. and ultimately to [Here is some text. to consider.](), which is just not right.

Possible approaches:

  1. Write code to handle periods properly, even these edge cases. Is that too much effort and spaghetti just to append a period in the right place? Maybe, but it is an accessibility requirement, isn't it?
  2. Just warn the user if it appears there's no terminal period. Can be a bit looser in detection and won't need to write code to do the replacement.
  3. Simply don't bother; leave it entirely to the user, but document it.

As it stands, I think the approach to terminal periods is haphazard. I don't think they're checked on the cover anywhere; only in the blank_cells and source columns of an a11ytable. It should be consistent.

@matt-dray matt-dray added documentation Improve or add documentation enhancement New feature or request discuss Point for discussion accessibility Meeting the guidelines code labels Nov 8, 2023
@matt-dray matt-dray removed the code label Dec 27, 2023
@matt-dray matt-dray added this to the Backlog milestone May 27, 2024
@matt-dray matt-dray added the should MoSCoW priority label May 27, 2024
@matt-dray matt-dray modified the milestones: Backlog, v0.4 May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Meeting the guidelines discuss Point for discussion documentation Improve or add documentation enhancement New feature or request should MoSCoW priority
Projects
None yet
Development

No branches or pull requests

1 participant