Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#226 2020-06-03 01:49:10
Re: com_connect - form and contact mailer
Bloke wrote #323514:
Sound advice. I can see why doing that is a good idea on three-and-a-bit of the government’s reasons. The rounding/exponential formatting is the biggest issue when dealing with giant numbers, otherwise hilarious things like this can happen. Scrolling with the mouse wheel too: definitely problematic in a lot of cases. The cryptic message that most browsers supply for violations is daft.
There are quite a few physical accessibility issues – you mention the scroll wheel thingie which does not happen with my trackpads and no mouse available, there is the size of the arrowed button (small small) and so on. keyboard access is reasonable as long as you just can type in that field. But if you don’t know what kind/type of numbers are acceptable, well…
The only thing I’m not entirely sold on is the accessibility issue. Playing devil’s advocate, it seems the NVDA screen reader should be fixed to handle
type="number"better. It’s been around long enough
hmm, don’t tell that to the lady down the road who’s trying to update her application for disability support… (but NVDA should fix their issues, sure).
Thanks for the updated <select /> syntax, I’ll test later today.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#227 2020-06-03 05:35:56
Re: com_connect - form and contact mailer
Bloke wrote #323515:
Thanks for the feedback, men. I’ve committed the bracket syntax so please test it to see how you get on.
That was quick! I’m trying to find the .zip.txt file.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#228 2020-06-03 06:06:52
Re: com_connect - form and contact mailer
colak wrote #323518:
That was quick! I’m trying to find the .zip.txt file.
You can download the .php file (head over to the “raw” mini tab) and on the TXP plugins panel choose the “upload plugin” widget.
–^–^–^–^–
Bloke, a first pass I get this, as attributes on the <txp:com_connect_option
<txp:com_connect_option class="" label="{Select one}" selected />
returns:
<option selected value="">Select one</option>
I think I would expect:
<option selected value="" label="Select one"></option>
But what it currently returns appears to validate and the browsers (Safari and Firefox) handle it correctly.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#229 2020-06-03 06:47:20
Re: com_connect - form and contact mailer
Ah, okay, yeah. We can set label instead of content. I was being consistent with how we output it now, and since it validated I didn’t go any further. I’ll look into it. Thanks for the feedback.
I haven’t bundled the plugin as a .txt file yet, colak. I’ll drop you a version via email later since I guess you’re testing this on pre-4.7 which doesn’t support PHP uploads (short of using the plugin cache feature).
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#230 2020-06-03 07:18:54
Re: com_connect - form and contact mailer
That did it. Thanks so much Stef and Philippe. The form now validates with some warnings which I will deal with.
The inputmode attribute is not supported in all browsers. Please be sure to test, and consider using a polyfill.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#231 2020-06-03 07:20:22
Re: com_connect - form and contact mailer
Bloke wrote #323521:
Ah, okay, yeah. We can set
labelinstead of content. I was being consistent with how we output it now, and since it validated I didn’t go any further. I’ll look into it. Thanks for the feedback.I haven’t bundled the plugin as a .txt file yet, colak. I’ll drop you a version via email later since I guess you’re testing this on pre-4.7 which doesn’t support PHP uploads (short of using the plugin cache feature).
I’m testing this on the latest txp. No problem, I uploaded the plugin. See my previous post.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#232 2020-06-03 07:55:43
Re: com_connect - form and contact mailer
The inputmode attribute is mostly a smartphone thingie – it is quite convenient to auto-select an appropriate keyboard that matches the input requirements (numbers / email address…). on your average desktop browser it doesn’t matter all that much.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#233 2020-06-03 08:24:54
Re: com_connect - form and contact mailer
I’ve just tweaked the code to add label, as suggested. Still validates. Note the commit message which explains a slight side-effect (duplication of content in the markup). Can we live with it this way? Or should we use the label only for the options="list, of, values" form and no label at all on the <txp:com_connect_option> version (i.e. just use the container)?
It’s non-trivial to make both approaches output the same markup, due to the way the plugin handles attributes.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#234 2020-06-03 08:33:57
Re: com_connect - form and contact mailer
Bloke wrote #323527:
I’ve just tweaked the code to add label, as suggested. Still validates. Note the commit message which explains a slight side-effect (duplication of content in the markup). Can we live with it this way? Or should we use the label only for the
options="list, of, values"form and no label at all on the<txp:com_connect_option>version (i.e. just use the container)?It’s non-trivial to make both approaches output the same markup, due to the way the plugin handles attributes.
I cannot see how this would be a problem but Philippe would most probably have a better insight.
phiw13 wrote #323525:
The
inputmodeattribute is mostly a smartphone thingie – it is quite convenient to auto-select an appropriate keyboard that matches the input requirements (numbers / email address…). on your average desktop browser it doesn’t matter all that much.
That makes sense! I wrapped it in <txp:act_if_mobile> and all works/validates just fine.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#235 2020-06-03 08:51:42
Re: com_connect - form and contact mailer
Bloke wrote #323527:
I’ve just tweaked the code to add label, as suggested. Still validates. Note the commit message which explains a slight side-effect (duplication of content in the markup). Can we live with it this way? Or should we use the label only for the
options="list, of, values"form and no label at all on the<txp:com_connect_option>version (i.e. just use the container)?
Ouch I see… That duplication might be a bit of an issue, accessibility wise. I have to think about it. On the other hand, the code does validate, so there is that.
<option value="Site issue" label="Site issue">Site issue</option>
Hmm, or maybe not. for AT tools and devices, the label will be announced instead of the value so that duplication is not completely there.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#236 2020-06-03 09:03:15
Re: com_connect - form and contact mailer
phiw13 wrote #323529:
That duplication might be a bit of an issue, accessibility wise.
Yeah. There is perhaps an avenue I could explore where if the name and label are identical I could just omit the label. That might work. You could reasonably use a different name for the field, but there’s no point repeating it otherwise.
My main concern is that screen readers etc don’t read it twice if there’s a label and container.
Last edited by Bloke (2020-06-03 09:12:23)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#237 2020-06-03 10:07:46
Re: com_connect - form and contact mailer
The Firefox accessibility inspector sees the label first. So I think this should be fine.
( it also vaguely complains about keyboard access not meeting the requirements, but I think that is just a bogus warning as the widget is fully usable from the keyboard.)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#238 2020-06-03 14:37:49
Re: com_connect - form and contact mailer
There appears to be a problem with the latest changes as there appears that there is no way to have a the valueless option selected when using com_connect_select.
I have tried
<txp:com_connect_select name="txp" label="Is your site powered by txp?" selected="{Select}" options="{Select},Yes,No" class="grid_24" required="1" />
,
<txp:com_connect_select name="txp" label="Is your site powered by txp?" selected="Select" options="{Select},Yes,No" class="grid_24" required="1" />
and
<txp:com_connect_select name="txp" label="Is your site powered by txp?" options="{Select},Yes,No" class="grid_24" required="1" />
which, in the previous version, Select was selected by default.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#239 2020-06-03 14:39:13
Re: com_connect - form and contact mailer
Doesn’t selected="" work? (that should be default, btw).
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#240 2020-06-03 14:41:35
Re: com_connect - form and contact mailer
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline