Open upsuper opened 5 years ago
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.
Yeah, I'm not proposing using the exact same name here, just the functionality.
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.
@keithamus do various platform APIs support that kind of setup? I was assuming they do not, given the dedicated twitter
type linked above.
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.
I see, I don't think we should support this for type
personally, only for inputmode
, as it's about virtual keyboards only.
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.
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 shortcodeNote, this is not enough for markdown, wiki, HTML, BBCode etc. LWL
I like the idea proposed in https://github.com/whatwg/html/issues/4589#issuecomment-489019845
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.
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.
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.