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

Fix #4532: language sensitivity of autocap #10119

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -81064,12 +81064,15 @@ body { display:none }

<h4>Autocapitalization</h4>

<p>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
<p>Some languages in some writing systems distinguish between upper, lower,
Copy link
Member

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.

Copy link
Contributor Author

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 Dutch ij). Anyway, happy to add a reference. Where should it point? Unicode glossary?

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

@annevk annevk Feb 9, 2024

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.

and <a href="https://unicode.org/glossary/#titlecase">titlecase</a> letters.
These distinctions are language-specific and their implementation varies in language-specific ways.
Some methods of entering text, for example virtual keyboards on mobile devices or voice
inputs, 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
toggle it back to lowercase) when a letter that should be autocapitalized is about to be typed.
Other types of input, for example voice input, may perform autocapitalization in a way that does
Other types of input, for example voice input, might perform autocapitalization in a way that does
not give users an option to intervene first. The <code
data-x="attr-autocapitalize">autocapitalize</code> attribute allows authors to control such
behavior.</p>
Expand Down