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

Read HTML entities, unicode characters, other symbols #3805

Open
nvaccessAuto opened this issue Jan 22, 2014 · 52 comments
Open

Read HTML entities, unicode characters, other symbols #3805

nvaccessAuto opened this issue Jan 22, 2014 · 52 comments

Comments

@nvaccessAuto
Copy link

@nvaccessAuto nvaccessAuto commented Jan 22, 2014

Reported by paulbohman on 2014-01-22 23:33
Many HTML entities, unicode characters, and other symbols are not read by default, or at all. When web developers or content writers put these characters or symbols in their content, it's almost always because they're using them to convey some meaning. There are exceptions, of course, when symbols may be used for decorative purposes, but I don't think that's the norm.

As an example, NVDA reads the left and right arrow HTML entities (← and →), but for some reason NVDA doesn't read up arrow or down arrow. When web authors use these characters, it's usually because they are conveying some meaning, like up to the next level, or down a level, or next page or previous page. Or maybe they're using them to explain the NVDA shortcut keys: Control plus alt plus up arrow, for example.

Similarly, symbols like the dagger or double dagger symbol might be used for footnotes. There are a lot of other characters and symbols out there -- and I realize that the magnitude of the lists of characters is an issue -- but in most cases they're used to convey meaning, so I would want them read by default.

For most of them, it's enough to simply say what the character is: "dagger" or "heart" or whatever the symbol is. I wouldn't worry about trying to interpret "I heart you" and changing it to "I love you." Just say what the symbol is.
Blocking #3752

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 22, 2014

Comment 1 by paulbohman on 2014-01-22 23:58
I realize I may need to be more specific and come up with a list of characters that I would recommend having read out loud, because I obviously don't want the screen reader to say things like "carriage return" or "horizontal tab," which are unicode characters. Let me offer these as a starting point for the conversation, using the list of unicode sets at http://en.wikipedia.org/wiki/List_of_Unicode_characters:

Latin 1-Supplement:

  • characters U+00A2 through U+00BE

Arrows:

  • all, from U+2190 to U+21Fx

Mathematical operators:

  • all, from U+2200 to U+22Fx

Geometric shapes:

  • all, from U+25A0 to U+25FF

Miscellaneous symbols:

  • all, from U+2600 to U+26FF

Dingbats

  • all, from U+2701 to U+27BF

Supplemental arrows-A:

  • all, from U+27F0 to U+27FF

Miscellaneous symbols and arrows:

  • all, from U+2B00 to U+2B59

Emoji:

  • all
@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 2 by jteh on 2014-01-23 00:27
This is fine, but for two things:

  1. We do need to be careful about how many symbols we define, as the more there are, the longer the symbol data will take to load. This will need to be judged on a case by case basis.
  2. The names need to be as short as possible, so it's not simply a matter of importing the Unicode names. This does need human intervention. :)

This is likely to be a pretty time consuming job, but it is just a matter of editing a file with tab separated values and following the documentation, so marking as goodForNewDev.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 3 by paulbohman on 2014-01-23 00:35
Thank you!

And believe me, I know how time consuming it is. Just writing the blog entry that I wrote took many hours of typing and testing.

As far as HTML entities go, I'm not sure where the most authoritative source is. This one seems pretty inclusive: http://dev.w3.org/html5/html-author/charref

Of these, my personal highest priorities would be anything that has to do with math, plus arrows, plus things like section, paragraph, and superscripts. There may be a few others that I'd like, but those come to mind.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 4 by paulbohman on 2014-01-23 00:45
By the way, if you need to combine this issue with the last one that I posted, feel free to do that. I meant for the two to refer to slightly different things, with one talking about keyboard punctuation and another talking about unicode and HTML entities, but I didn't do a good job of distinguishing them in my descriptions. Sorry about that.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 5 by driemer.riemer@... on 2014-01-23 02:58
How do I do this? I am interested in working on the code.
Would it be in the punctuation data in the locale folder in symbols.dic? If so won't this data need translated?

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 6 by briang1 on 2014-01-23 08:32
I am not sure about the shortness rule. I found when i wrote my version of the existing file to make _ into underscore and ! into Exclamation that although longer, they were easier to interpreet to me at least.

Also, what happens, for example in Usenet newsgroups where I think greater than or less than is used to denote quoted text. I have made sure these are only spoken in all, but it might well be that one needs to say, quoted text the first time one encounters the symbol in a news client.

Also presumably, these will need manually editing for each instance for all the languages in nvda by the translators. There are a heck of a lot.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 7 by nvdakor on 2014-01-23 10:15
Hi,
Yes, you'll need to modify source/locale/en/symbols.dic, and we the translators will get a diff folder with new symbols added. However, as Jamie pointed out, we should be careful about which symbols we should add.
For superscripts and subscripts, we could work around this via regexp speech rule so that NVDA will speak superscript number (if these are located next to each other in Unicode tables).
Good luck.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 8 by nishimotz on 2014-01-23 12:32
Regarding this, Unicode 6.0 Emoji characters, as well as some CJK ideographic characters, are out of Unicode Basic Multilingual Plane, and they can not be handled correctly even if they are in the symbol or character description tables.
According to #2090, work around the surrogates are very limited so far.
Is this correct?

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 9 by driemer.riemer@... on 2014-01-23 22:38
so if I work on this, what symbols should be prioritized? Also, how do I get my changes to
nvaccess?

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 10 by jteh (in reply to comment 8) on 2014-01-23 23:00
Replying to nishimotz:

Regarding this, Unicode 6.0 Emoji characters, as well as some CJK ideographic characters, are out of Unicode Basic Multilingual Plane, and they can not be handled correctly even if they are in the symbol or character description tables.

As I understand it, the symbol table should be able to handle this; it can handle multiple codepoints in the same entry. The issue is more whether APIs can handle passing multi-codepoint characters to us. Some work might be needed on speak spelling/character descriptions.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jan 23, 2014

Comment 11 by jteh (in reply to comment 9) on 2014-01-23 23:01
Replying to driemer.riemer@…:

how do I get my changes to

nvaccess?

Ideally, a Git branch. Failing that, a patch. As a last resort, just the modified file, but please tell us which revision of the code it is based on. Always base changes on the master branch. Thanks.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Feb 26, 2014

Comment 12 by JohnHoltRipley on 2014-02-26 13:54
If it helps at all, I've been researching how other Screen Readers handle Unicode characters, and the results are here:
http://unicode.johnholtripley.co.uk/all/screenreader

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Mar 13, 2014

Comment 13 by nvdakor on 2014-03-13 23:18
Hi,
I do know that there is an add-on which reads Emoticons.
For Derek: I'll go ahead and create an experimental t3805 branch on the community dev repo.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Mar 13, 2014

Comment 14 by nvdakor on 2014-03-13 23:22
Hi all,
For devs interested in working on this branch, I have created a community development repo at:

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Aug 17, 2014

Comment 15 by driemer.riemer@... on 2014-08-17 04:52
So I think that some math homework systems show their symbols with the raw unicode. I am going to add this support to my git fork and then commit this. I will try throwing in some other symbols when there.
https://derek_riemer_@bitbucket.org/derek_riemer_/nvda.git
I will create this in t3805 and see what happens here as I git going on this.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Oct 23, 2014

Comment 18 by ajirving on 2014-10-23 18:17
Adding more symbols is a good idea if they're used sufficiently often, but we presumably don't want to have the entire unicode table. Why not add a function which uses the python unicodedata module to lookup the name of a character? It could be bound to the read character key pressed 4 times.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Oct 23, 2014

Comment 19 by jteh (in reply to comment 18) on 2014-10-23 21:49
Replying to ajirving:

Why not add a function which uses the python unicodedata module to lookup the name of a character?

The problem with this is that it is English only and cannot be localised.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 1, 2014

Comment 20 by siddhartha_iitd on 2014-12-01 07:08
I've added some characters and their respective descriptions in symbols.dic file. Following categories of characters are included:
Mathematical Operators
Arrows
Dingbats
Geometric Shapes
Miscellaneous Symbols
Emoticons
Superscripts & Subscripts

For some characters, no standard description could be found. So, such characters are included without any description. If we want to retain such characters, we might have to go with non-standard descriptions.

Please check the branch in_t3805 by following the below mentioned url:
https://manish_agrawal@bitbucket.org/manish_agrawal/nvda.git

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 1, 2014

Comment 21 by jteh on 2014-12-01 10:04
Please remove any characters without descriptions, as these aren't useful to users. Perhaps someone will subsequently report the need for one of these characters, but in that case, they will also hopefully be able to provide a useful description. Thanks.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 1, 2014

Comment 22 by siddhartha_iitd (in reply to comment 21) on 2014-12-01 11:24
Replying to jteh:

Please remove any characters without descriptions, as these aren't useful to users. Perhaps someone will subsequently report the need for one of these characters, but in that case, they will also hopefully be able to provide a useful description. Thanks.

Thanks for quick reply! The characters without any standard description are removed from symbols.dic file. The updated symbols.dic file is available in branch '''in_t3805''' at following url:
https://manish_agrawal@bitbucket.org/manish_agrawal/nvda.git

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 1, 2014

Comment 24 by driemer.riemer@... on 2014-12-01 15:05
If people could make a list of the symbols they would find useful, so we can find the common symbols, that would be great. It also might be good to block this with the ticket to let users add their own custom symbols as well.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 1, 2014

Comment 25 by jteh (in reply to comment 24) on 2014-12-01 21:56
Replying to driemer.riemer@…:

If people could make a list of the symbols they would find useful, so we can find the common symbols, that would be great.

I suggest we start with the changes proposed in comment:20. If you're interested, it'd be good if you can take a look at that.

It also might be good to block this with the ticket to let users add their own custom symbols as well.

Blocking doesn't make sense. This is about the default experience. Customising is a complementary feature, but not a requirement for improving the default experience.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 6, 2014

Comment 26 by dineshkaushal on 2014-12-06 07:14
How about using unicodedata.name instead of defining all these symbols?

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Dec 6, 2014

Comment 27 by jteh (in reply to comment 26) on 2014-12-06 10:19
Replying to dineshkaushal:

How about using unicodedata.name instead of defining all these symbols?

The Unicode names are English only and overly verbose for screen reader use.

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Mar 26, 2015

Comment 28 by dineshkaushal on 2015-03-26 11:17
I was reading some mathematical Equations, and I found NVDA was not reading some symbols such as summation sign and sign for beta. I tried branch in_t3805 which is created by Siddhartha Gupta, and I could read those symbols.

Is this branch going to be part of 15.2?

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Mar 26, 2015

Comment 29 by siddhartha_iitd on 2015-03-26 14:17
Added small and capital Greek Alphabets. The updated file is available in branch in_t3805 at following url:
https://bitbucket.org/manish_agrawal/nvda.git

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 14, 2015

Comment 30 by jteh on 2015-04-14 07:11
We're going to do this in phases:

  1. Take the math symbols as is. Mick will do this.
  2. Investigate how to handle Greek letters without breaking Greek. I'll handle this.
  3. Investigate other common symbols for inclusion. This one is controversial, but the reality is that I don't want to include a massive number of symbols that will rarely be used for performance and translation reasons. The names also need to be as brief as possible (some of the names in the proposed patch are overly descriptive for a screen reader) and hand editing all of these will be painful.
  4. Investigate a way to use the English Unicode names as a last resort, so that even if all else fails, the user can get something. I imagine we'd do this as a character description rather than trying to report these normally. Aside from avoiding verbosity, this is also necessary because we don't want characters that would normally be pronounced by the user's synthesiser being clobbered by this. (It's important to note that we have no idea what characters various synths will report and synths don't provide any indication of this.)
@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Apr 30, 2015

Comment 31 by Michael Curran <mick@... on 2015-04-30 04:57
In [3f73d94]:

Merge branch 't3805' into next. Incubates #3805

Changes:
Added labels: incubating

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jun 19, 2015

Comment 32 by Michael Curran <mick@... on 2015-06-19 19:11
In [b5d0db7]:

Merge branch 't3805'. Fixes #3805

Changes:
Removed labels: incubating
State: closed

@nvaccessAuto
Copy link
Author

@nvaccessAuto nvaccessAuto commented Jun 19, 2015

Comment 33 by mdcurran on 2015-06-19 19:15
Changes:
Milestone changed from None to 2015.3

@raebened
Copy link

@raebened raebened commented Jun 16, 2016

Request addition of the Unicode star symbols. 2726, 2605, 2736, 2734, 2739, and 2735. These are used as bullets and in tables as indicators like the checkmark symbol

@jage9
Copy link
Contributor

@jage9 jage9 commented Apr 24, 2017

With the understanding that it isn't ideal to add every symbol in the world under the current construct, I'd like to propose adding symbols for fractions U+2150 to U+215E. I have a symbols.dic with these changes I'm willing to submit.
Rationale: The fraction symbols are used commonly in at least two constructs. Many recipes use them to indicate ingredient amounts. In addition, baseball statistics use thirds of an inning which is often denoted using these symbols.
We are already speaking the ASCII fractions 1/2 and 1/4 so this would speak similarly. We are also speaking many other math symbols and this would extend that functionality.

Thoughts? Can do a pull request if you think it's appropriate or a new issue since this would not close 3805.

@jcsteh
Copy link
Contributor

@jcsteh jcsteh commented Apr 24, 2017

@feerrenrut feerrenrut added the p4 label Apr 24, 2017
@feerrenrut
Copy link
Member

@feerrenrut feerrenrut commented Apr 24, 2017

Setting as priority 4, it's very unlikely that someone from NV Access will be able to get to this work given the current priorities, however we will gladly accept pull requests. It would be fantastic if anyone looking into this issue could summarise all of the remaining work on this issue.

@jage9
Copy link
Contributor

@jage9 jage9 commented Apr 24, 2017

Ah good point on the ASCII. Explains why those aren't in the current symbols.dic. Will work on submitting my virgin pull request.

@jage9
Copy link
Contributor

@jage9 jage9 commented Apr 24, 2017

@Brian1Gaff
Copy link

@Brian1Gaff Brian1Gaff commented Apr 24, 2017

feerrenrut added a commit that referenced this issue Apr 25, 2017
Re issue #3805
Merge branch 'jage9-fractions' into next
feerrenrut added a commit that referenced this issue May 8, 2017
Added support for unicode up / down arrows and fraction symbols.
Part of issue #3805
@leonardder
Copy link
Collaborator

@leonardder leonardder commented Jan 10, 2019

@jage9: Do you have an idea about how to bring this further?

We now have emoji dictionaries, and loading them takes some time, however it is barely noticeable. The sluggishness in the symbols dialog is covered in a pr, so that shouldn't hold us back from adding additional symbols.

I have a branch that implements #9138, and I could add additional symbols to that branch to continue the work on this issue.

@jage9
Copy link
Contributor

@jage9 jage9 commented Jan 10, 2019

Is there a master list for Unicode symbols similar to what was used for emoji? There are some differences to consider though.
While a consistent punctuation level can be applied for emoji, Unicode symbols serve multiple purposes. Some screen readers allow you to set a punctuation level for categories of symbols such as all math symbols.
NVDA should definitely speak something if a symbol is not in the dictionary, even if it is the Unicode value, at least when arrowing by character.
Even if there is a master list, the descriptions on this list may be too verbose for our purposes. This was not a big issue for emoji.
We can add all remaining symbols to the English dictionary, but what does this do for translations? Also, as mentioned above, US and UK English refer to some symbols differently.
I definitely think we should expand to add the symbols that are not currently included.

@JamesCatt
Copy link
Contributor

@JamesCatt JamesCatt commented Mar 21, 2019

Not sure if this is an appropriate thread or if I should open a new one.

I've discovered that NVDA (2018.4.1) doesn't read the HTML &minus; entity. JAWS, Voiceover and Talkback all announce it correctly. This is a serious problem because of instances where this information is essential—the difference between "two hundred dollars" and "minus two hundred dollars" is pretty significant. Due in part to NVDA's behavior, there's literally no way to get this to announce properly and consistently in all the major screen readers.

For some additional context, most screen readers will announce "-$200" (using a dash/hyphen) as "minus two hundred dollars", but not Talkback. I'm planning to submit a bug report to them as well, but IMO NVDA is the worse offender here—treatment of hyphens can be argued. Treatment of the minus entity cannot. If the author explicitly used the minus entity then that should be respected by the screen reader.

@jage9
Copy link
Contributor

@jage9 jage9 commented Mar 21, 2019

@jage9
Copy link
Contributor

@jage9 jage9 commented Mar 21, 2019

@JamesCatt
Copy link
Contributor

@JamesCatt JamesCatt commented Nov 26, 2019

@jage9 could be something as simple as this?

negative number	(?<!\w)[-−]{1}(?=[$£€¥.]?\d)

PS: For general reading would adding after this after the plus entry suffice?

−	minus	some

Never contributed to NVDA before so forgive me if I'm missing something.

@StommePoes
Copy link

@StommePoes StommePoes commented Jan 23, 2020

@jage9

Does this go in the area where negative numbers are handled currently with the minus sign?

If this only worked with negative numbers (where the symbol is next to the number, as currently happens now with dash and hyphen-minus), then it would still fail basic math (3 − 5 = −2). I would think the minus symbol needs to be standalone, outside of just negative numbers.

@jage9
Copy link
Contributor

@jage9 jage9 commented Mar 22, 2020

Since we have free time in the world, backtracking to my Jan 10, 2019 comment and wondering if people have thoughts. I'm happy to greatly expand the symbols.dic file for English as I did previously for math, if there isn't a large concern on load time. I'm not sure what this would do for translations or if there is a quicker way. But this is a long-standing feature that could use some closure since many of these symbols are vital in various professions/hobbies.

@gregjozk
Copy link
Contributor

@gregjozk gregjozk commented Aug 13, 2020

here is source, which helps me:
https://en.wiktionary.org/wiki/Category:Unicode_blocks
there are subcategories and more important pages with tables of unicode characters and their explanations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet