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

Add twitter for <input>'s type and global inputmode attributes? #4589

Open
upsuper opened this issue May 3, 2019 · 10 comments
Open

Add twitter for <input>'s type and global inputmode attributes? #4589

upsuper opened this issue May 3, 2019 · 10 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@upsuper
Copy link
Member

upsuper commented May 3, 2019

iOS's keyboard has a keyboard type twitter which means text with easy access to @ and #.

Nowadays @ and # are pretty much the de-facto way to mention people and add tag, so authors may want to be able to make use of this keyboard type. It would probably be good to provide this functionality to the web platform.

@annevk annevk added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels May 3, 2019
@annevk
Copy link
Member

annevk commented May 3, 2019

If we do this, I'd prefer a more generic name such as "social-text" as this also applies to various other products, e.g., GitHub and Slack.

@upsuper
Copy link
Member Author

upsuper commented May 3, 2019

Yeah, I'm not proposing using the exact same name here, just the functionality.

@keithamus
Copy link
Contributor

Just an idea, but what about abstracting this into something like a common-characters attribute which could be used at the browsers discretion to provide easy access to additional keys; <input type="text" common-characters="@,#"> might be useful for social networking sites, while <input type="number". common-characters="+,-,*,/,="> would be useful for a calculator.

@annevk
Copy link
Member

annevk commented May 3, 2019

@keithamus do various platform APIs support that kind of setup? I was assuming they do not, given the dedicated twitter type linked above.

@keithamus
Copy link
Contributor

Yeah I imagine they don't, I'm mostly concerned that adding another input type which is just text with a different keyboard confuses the issue more. Even if browsers hooked off of fixed strings of common-characters there's still scope for extensibility.

@annevk
Copy link
Member

annevk commented May 3, 2019

I see, I don't think we should support this for type personally, only for inputmode, as it's about virtual keyboards only.

@dtapuska
Copy link
Contributor

dtapuska commented May 3, 2019

For inputmode we chose the intersection between what is supported on popular mobile platforms (Android and iOS). It is not possible to set a "twitter" keyboard on Android. There is a "short-text" type and I think we should try to understand how that behaves whether it provides the same functionality as the "twitter" keyboard on iOS.

@Crissov
Copy link

Crissov commented Dec 21, 2019

WhatsApp, Youtube, Slack and many more would benefit from some punctuation characters being directly accessible for formatting / markup:

  • @: ping, mention
  • #: tag
  • _: emphasis (underline, italic)
  • *: emphasis (bold)
  • `: code (fixed width)
  • ~: edit (strike-through)
  • :: emoji shortcode

Note, this is not enough for markdown, wiki, HTML, BBCode etc. LWL

@jcayzac
Copy link

jcayzac commented May 11, 2021

I like the idea proposed in #4589 (comment)

Even if the UA doesn't support a VK layout with all the symbols requested, this can be used as a hint to select from the various available layouts. inputmode="text" easyaccess=":@#" for instance would result in the twitter VK being used in Mobile Safari.

Regarding the value of this new attribute, since it would be used as a hint, the positional order of each character could correspond to the priority of each character, so the :@# value above would prefer a layout that only exposes : and @ on its first/main view to a layout that only exposes @ and #, for example.

@Crissov
Copy link

Crissov commented May 11, 2021

I’d suggest message or comment – or perhaps text message or text-message if that improves backwards compatibility. Android’s short-message(as in SMS) would be okay, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

6 participants