-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix #4532: language sensitivity of autocap #10119
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81064,7 +81064,8 @@ body { display:none } | |
|
||
<h4>Autocapitalization</h4> | ||
|
||
<p>Some methods of entering text, for example virtual keyboards on mobile devices, and also voice | ||
<p>A few languages and writing systems distinguish between upper, lower, and titlecase letters. | ||
Some methods of entering text, for example virtual keyboards on mobile devices, and also voice | ||
input, often assist users by automatically capitalizing the first letter of sentences (when | ||
composing text in a language with this convention). A virtual keyboard that implements | ||
autocapitalization might automatically switch to showing uppercase letters (but allow the user to | ||
|
@@ -81078,7 +81079,9 @@ body { display:none } | |
implemented, does not affect behavior when typing on a physical keyboard. (For this reason, as | ||
well as the ability for users to override the autocapitalization behavior in some cases or edit | ||
the text after initial input, the attribute must not be relied on for any sort of input | ||
validation.)</p> | ||
validation.) Virtual keyboards or other input systems normally interpret this attribute in a | ||
script or language-specific manner. In some languages the hints are ignored or can receive | ||
special treatment.</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already talk about how it works when implemented for virtual keyboards above: "A virtual keyboard that implements". If anything we should modify that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. Watch for revision. |
||
|
||
<p>The <code data-x="attr-autocapitalize">autocapitalize</code> attribute can be used on an <span | ||
data-x="editing host">editing host</span> to control autocapitalization behavior for the hosted | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"titlecase letter" needs a reference. Assuming this is about the Unicode code point category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't necessarily about the code point category. Titlecasing is more complicated than just the explicit mappings, since some languages use digraphs and titlecase them in different ways (compare Serbian
dz
and Dutchij
). Anyway, happy to add a reference. Where should it point? Unicode glossary?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a reasonable reference, but it needs to be introduced above as part of the Unicode and Encoding section. It seems we currently don't reference any terms from Unicode, but you can use introductory wording similar to what we do for Encoding. Let me know if you need help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Part of me is twitching because we generally use the i18n-glossary as a proxy for Unicode terminology. We don't have
titlecase
defined there either, at the moment, but could do, especially as we have extensive illustrations of the problems being discussed here in charmod-norm.In the interim 52d6dd8 includes a link to the Unicode glossary. I will look at the Unicode and Encoding section in HTML and make an additional push after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18n-glossary has reached production (TR) with 'titlecase' exported.
I looked at the "Unicode and Encoding" section, but that seems to be where terms exported from Encoding are brought in. Encoding has no reason to define upper/lower/titlecase, so I feel like this doesn't belong there.
I see that there is a section about Infra (and a list of imported terms) there (and this list naturally includes the ASCII casing terms (
ASCII lowercase
,ASCII uppercase
,ASCII case-insensitive
) that are core to HTML. Unicode case handling isn't there either, but could be incorporated.Given that this is a "fleeting reference", can we keep it local? Failing that, we could link the I18N glossary or we could link Character Model: String Matching which explains case folding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also where in theory we could bring in references from Unicode (it's both Encoding and Unicode after all). Would need an equivalent paragraph and list.
I'm not entirely sure how I feel about referencing the i18n glossary or the Character Model as those documents feel like they're summarizing more authoritative sources and I'd rather we reference the latter.