diff --git a/permission-element.bs b/permission-element.bs index 88c9d54..a820fa4 100644 --- a/permission-element.bs +++ b/permission-element.bs @@ -583,8 +583,6 @@ To recheck type permissibility for a # Rendering the <{permission}> Element # {#rendering} -## Presentation ## {#presentation} - The <{permission}> element is a [=non-devolvable widget=] and is chiefly rendered like a <{button}>. The button label is largely expected to be determined by the browser, rather than the page, and reflects the @@ -595,6 +593,47 @@ constraints to prevent abuse (e.g. minimum and maximum sizes for fonts and the label itself). The page can also select a locale for the text via the <{html-global/lang}> attribute. +## Presentation ## {#presentation} + +ISSUE: There isn't much precedence for describing the user agent UI in detail. + It may be better to leave more freedom to user agents. + +The <{permission}> element contains browser-chosen content, text and maybe an +icon. Activating it will [=prompt the user to choose=]. +This provides two bits of user interface that a user can interact with. +The [=user agent=] is largely free to determine these — rendering of the +<{permission}> element and the subsequent [=prompt the user to choose|permission +prompt=] — in whichever way it thinks best convey's the element's intent. + + +UI options for the <{permission}> element's presentation include: + +* Name the [=powerful features=] listed in {{[[Types]]}}, in the language + indicated by the [=language=] of the element. Note that this would + always be the language indicated by the <{html-global/lang}> attribute, + if present. +* An icon indicating the [=powerful feature=] type or types. +* The current [=permission state=] of the [=powerful feature=] in questions. + For example, if the [=powerful feature|permission=] is already + {{PermissionState/granted}}, the <{permission}> element might be labeled + as "geolocation already in use". +* A modal [=prompt the user to choose|prompt=] with a "scrim". + (I.e., darkening out the page behind the prompt.) + This would normally quite disruptive. But here our goal is to ensure a + user means to make this choice. + +[=User agents=] are encouraged to name or describe the [=powerful features=] +in a way that's consistent with similar usage in program or the platform it +is running on. + +Very non-normative examples might be: + +* ``: "Standort verwenden". +* `` (in an English language page): "Use microphone. 🎤". +* Upon activiating ``, when the corresponding + [=permission state=] is {{PermissionState/denied}}, modify the text to + "Continue blocking". + ## Styling ## {#style} A <{permission}> element constrains the styling that can be applied to it.