Skip to content

Commit

Permalink
enterkeyhint
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedziolkaMichal authored and sideshowbarker committed Oct 25, 2022
1 parent 0db229a commit 70f3044
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
44 changes: 41 additions & 3 deletions schema/html5/applications.rnc
Expand Up @@ -10,8 +10,6 @@ datatypes w = "http://whattf.org/datatype-draft"
( common.attrs.contenteditable?
& common.attrs.draggable?
& common.attrs.hidden?
& common.attrs.spellcheck?
& common.attrs.autocapitalize?
)

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

## Global attributes applicable on elements with editable content

common.attrs.editing &=
( common.attrs.inputmode?
& common.attrs.spellcheck?
& common.attrs.autocapitalize?
& common.attrs.enterkeyhint?
)

common.attrs.other &= common.attrs.editing

## Hint expected data type: inputmode

common.attrs.inputmode =
attribute inputmode {
( w:string "none"
| w:string "text"
| w:string "tel"
| w:string "url"
| w:string "email"
| w:string "numeric"
| w:string "decimal"
| w:string "search"
)
}

## Spellchecking and grammar checking: spellcheck

common.attrs.spellcheck =
attribute spellcheck{
attribute spellcheck {
w:string "true" | w:string "false" | w:string ""
}

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

## Type of Enter button on virtual keyboards: enterkeyhint

common.attrs.enterkeyhint =
attribute enterkeyhint {
( w:string "enter"
| w:string "done"
| w:string "go"
| w:string "next"
| w:string "previous"
| w:string "search"
| w:string "send"
)
}

## Application Cache: manifest

html.attrs.manifest =
Expand Down
6 changes: 0 additions & 6 deletions schema/html5/common.rnc
Expand Up @@ -202,7 +202,6 @@ common.attrs.present =

common.attrs.other =
( common.attrs.autofocus?
& common.attrs.inputmode?
& common.attrs.nonce?
)

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

common.attrs.inputmode =
attribute inputmode {
string
}

common.attrs.nonce =
attribute nonce {
string
Expand Down
1 change: 1 addition & 0 deletions schema/html5/embed.rnc
Expand Up @@ -321,6 +321,7 @@ namespace local = ""
| aria-roledescription
| spellcheck
| autocapitalize
| enterkeyhint
| accesskey
| itemref
| itemprop
Expand Down

0 comments on commit 70f3044

Please sign in to comment.