Changeset

5649:f889ff779571

mod_http_oauth2: Improve templates XML-ness by avoiding value-less attributes or whatever they're called Plus some Aria label tweaks
author Kim Alvefur <zash@zash.se>
date Tue, 08 Aug 2023 17:04:50 +0200
parents 5648:2a31ee81e816
children 5650:1571c280aaef
files mod_http_oauth2/html/consent.html mod_http_oauth2/html/device.html mod_http_oauth2/html/login.html mod_http_oauth2/html/oob.html
diffstat 4 files changed, 12 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/html/consent.html	Mon Aug 07 22:52:14 2023 +0200
+++ b/mod_http_oauth2/html/consent.html	Tue Aug 08 17:04:50 2023 +0200
@@ -36,18 +36,18 @@
 
 		<dt>Requested permissions</dt>
 		<dd>{scopes#
-			<input class="scope" type="checkbox" id="scope_{idx}" name="scope" value="{item}" checked><label class="scope" for="scope_{idx}">{item}</label>}
+			<input class="scope" type="checkbox" id="scope_{idx}" name="scope" value="{item}" checked="" /><label class="scope" for="scope_{idx}">{item}</label>}
 		</dd>
 	</dl>
 
 	<p>To allow <em>{client.client_name}</em> to access your account
-	   <em>{state.user.username}@{state.user.host}</em> and associated data,
-	   select 'Allow'. Otherwise, select 'Deny'.
+	<em>{state.user.username}@{state.user.host}</em> and associated data,
+	select 'Allow'. Otherwise, select 'Deny'.
 	</p>
 
-		<input type="hidden" name="user_token" value="{state.user.token}">
-		<button type="submit" name="consent" value="denied">Deny</button>
-		<button type="submit" name="consent" value="granted">Allow</button>
+	<input type="hidden" name="user_token" value="{state.user.token}">
+	<button type="submit" name="consent" value="denied">Deny</button>
+	<button type="submit" name="consent" value="granted">Allow</button>
 	</form>
 	</fieldset>
 	</main>
--- a/mod_http_oauth2/html/device.html	Mon Aug 07 22:52:14 2023 +0200
+++ b/mod_http_oauth2/html/device.html	Tue Aug 08 17:04:50 2023 +0200
@@ -24,7 +24,7 @@
 {client~
 	<p>Enter the code to continue.</p>
 	<form method="get">
-		<input type="text" name="user_code" placeholder="XXXX-XXXX" aria-label="user-code" required="" />
+		<input type="text" name="user_code" placeholder="XXXX-XXXX" aria-label="Code" required="" />
 		<button type="submit">Continue</button>
 	</form>}
 	</fieldset>
--- a/mod_http_oauth2/html/login.html	Mon Aug 07 22:52:14 2023 +0200
+++ b/mod_http_oauth2/html/login.html	Tue Aug 08 17:04:50 2023 +0200
@@ -20,8 +20,10 @@
 	<legend>Sign in</legend>
 	<p>Sign in to your account to continue.</p>
 	<form method="post">
-		<input type="text" name="username" placeholder="Username" aria-label="Username" autocomplete="username" required {extra.username_hint~autofocus} {extra.username_hint&value="{extra.username_hint?}"} /><br/>
-		<input type="password" name="password" placeholder="Password" aria-label="Password" autocomplete="current-password" required {extra.username_hint&autofocus} /><br />
+		<input type="text" name="username" placeholder="Username" aria-label="Username"
+			autocomplete="username" required="" {extra.username_hint~autofocus=""} {extra.username_hint&value="{extra.username_hint?}"} /><br/>
+		<input type="password" name="password" placeholder="Password" aria-label="Password"
+			autocomplete="current-password" required="" {extra.username_hint&autofocus=""} /><br />
 		<input type="submit" value="Sign in" />
 	</form>
 	</fieldset>
--- a/mod_http_oauth2/html/oob.html	Mon Aug 07 22:52:14 2023 +0200
+++ b/mod_http_oauth2/html/oob.html	Tue Aug 08 17:04:50 2023 +0200
@@ -14,7 +14,7 @@
 	<h2>Your Authorization Code</h2>
 	<p>Here’s your authorization code, copy and paste it into {client.client_name}</p>
 	<div class="oob">
-		<p><input readonly name="authorization_code" value="{authorization_code}"></p>
+		<p><input readonly="" name="authorization_code" value="{authorization_code}" aria-label="Authorization Code"></p>
 	</div>
 	</main>
 </body>