Inputs of type="number" need updating to adhere to ACC2 on intranet-tmpl/prog/en/modules/tools/overduerules.tt
Hi Martin, I tried to find more information on this and was probably searching for the wrong thing. Can you please provide a resource for ACC2?
(In reply to Aleisha Amohia from comment #1) > Hi Martin, I tried to find more information on this and was probably > searching for the wrong thing. Can you please provide a resource for ACC2? Never mind, just saw the comment on Bug 26926 :)
Sorry, I should have linked to the Guidelines.. https://wiki.koha-community.org/wiki/Coding_Guidelines#ACC2:_Input_type_.22number.22_should_be_avoided Splitting them up into lots of tiny bugs as requested by Katrin took me a little while and I didn't think to add the link to all bugs.
Created attachment 115380 [details] [review] Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" Test plan: Open the file and ensure that no other inputs of type="number were missed.
Created attachment 115393 [details] [review] Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" Test plan: Open the file and ensure that no other inputs of type="number were missed.
Created attachment 115395 [details] [review] Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" Test plan: Open the file and ensure that no other inputs of type="number were missed.
There is more to do when converting a "type='number'" input: If present, the "step," "max," and "min" attributes should be removed too. They are invalid if applied to a standard text input. Example errors from the w3c validator: Error: Attribute step not allowed on element input at this point. Error: Attribute min not allowed on element input at this point.
Created attachment 115455 [details] [review] Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" The "min" attribute has also been removed (Thanks Owen) Test plan: Open the file and ensure that no other inputs of type="number were missed.
Created attachment 115479 [details] [review] Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" The "min" attribute has also been removed (Thanks Owen) Test plan: Open the file and ensure that no other inputs of type="number were missed. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 115519 [details] [review] Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" The "min" attribute has also been removed (Thanks Owen) Test plan: Open the file and ensure that no other inputs of type="number were missed. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Great work, thank James. Passing QA
Created attachment 115557 [details] [review] Bug 27412: Update tools/overduerules.tt to adhere to ACC2 This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*" The "min" attribute has also been removed (Thanks Owen) Test plan: Open the file and ensure that no other inputs of type="number were missed. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pushed to master for 21.05, thanks to everybody involved!