Skip to content

Commit 70f3044

Browse files
NiedziolkaMichalsideshowbarker
authored andcommitted
enterkeyhint
1 parent 0db229a commit 70f3044

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

schema/html5/applications.rnc

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ datatypes w = "http://whattf.org/datatype-draft"
1010
( common.attrs.contenteditable?
1111
& common.attrs.draggable?
1212
& common.attrs.hidden?
13-
& common.attrs.spellcheck?
14-
& common.attrs.autocapitalize?
1513
)
1614

1715
common.attrs.other &= common.attrs.interact
@@ -37,10 +35,36 @@ datatypes w = "http://whattf.org/datatype-draft"
3735
w:string "hidden" | w:string ""
3836
}
3937

38+
## Global attributes applicable on elements with editable content
39+
40+
common.attrs.editing &=
41+
( common.attrs.inputmode?
42+
& common.attrs.spellcheck?
43+
& common.attrs.autocapitalize?
44+
& common.attrs.enterkeyhint?
45+
)
46+
47+
common.attrs.other &= common.attrs.editing
48+
49+
## Hint expected data type: inputmode
50+
51+
common.attrs.inputmode =
52+
attribute inputmode {
53+
( w:string "none"
54+
| w:string "text"
55+
| w:string "tel"
56+
| w:string "url"
57+
| w:string "email"
58+
| w:string "numeric"
59+
| w:string "decimal"
60+
| w:string "search"
61+
)
62+
}
63+
4064
## Spellchecking and grammar checking: spellcheck
4165

4266
common.attrs.spellcheck =
43-
attribute spellcheck{
67+
attribute spellcheck {
4468
w:string "true" | w:string "false" | w:string ""
4569
}
4670

@@ -57,6 +81,20 @@ datatypes w = "http://whattf.org/datatype-draft"
5781
)
5882
}
5983

84+
## Type of Enter button on virtual keyboards: enterkeyhint
85+
86+
common.attrs.enterkeyhint =
87+
attribute enterkeyhint {
88+
( w:string "enter"
89+
| w:string "done"
90+
| w:string "go"
91+
| w:string "next"
92+
| w:string "previous"
93+
| w:string "search"
94+
| w:string "send"
95+
)
96+
}
97+
6098
## Application Cache: manifest
6199

62100
html.attrs.manifest =

schema/html5/common.rnc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ common.attrs.present =
202202

203203
common.attrs.other =
204204
( common.attrs.autofocus?
205-
& common.attrs.inputmode?
206205
& common.attrs.nonce?
207206
)
208207

@@ -211,11 +210,6 @@ common.attrs.other =
211210
w:string "autofocus" | w:string ""
212211
}
213212

214-
common.attrs.inputmode =
215-
attribute inputmode {
216-
string
217-
}
218-
219213
common.attrs.nonce =
220214
attribute nonce {
221215
string

schema/html5/embed.rnc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ namespace local = ""
321321
| aria-roledescription
322322
| spellcheck
323323
| autocapitalize
324+
| enterkeyhint
324325
| accesskey
325326
| itemref
326327
| itemprop

0 commit comments

Comments
 (0)