Skip to content

Add note about transaction-amount to 1.3.5 understanding #4362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

patrickhlauke
Copy link
Member

Follow-up to #3539

Adds a note that tries to square the circle on why "transaction amount" is included.

Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for wcag2 ready!

Name Link
🔨 Latest commit bb4709a
🔍 Latest deploy log https://app.netlify.com/projects/wcag2/deploys/682f547aacd6a80008dd11f7
😎 Deploy Preview https://deploy-preview-4362--wcag2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

<p>When the user agent and assistive technology support for other metadata formats matures, metadata schemes like the <a href="https://www.w3.org/TR/adapt-symbols/">WAI-Adapt: Symbols Module</a> may be used in addition or instead of the HTML autocomplete attribute to identify the purpose of input fields. They can also support automated adaptations that identify and match author-provided input labels to defined vocabularies or symbols that are used instead for labelling inputs.</p>
<p class="note">Even though the normative wording of this Success Criterion mentions <q>information about the user</q>, the list of <a href="https://www.w3.org/TR/WCAG21/#input-purposes">Input Purposes</a> includes a few values that may not strictly be interpreted as directly relating to a user – most prominently, <code>transaction-amount</code>. In this specific case, authors are required to identify the input fields for transaction amounts when it's a transaction that users are carrying out for themselves.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"for themselves" seems a little awkward. TF would like someone to wordsmith this

reviewed on TF. Lowercased SC, removed reference to 2.1.
@bruce-usab
Copy link
Contributor

Discussed on TF call. Request to @dbjorge or @WilcoFiers tp provide a constructive example? What is a situation where transaction-amount would be helpful for personalization and addresses coga-related need? In previous discussions, there was consensus that auto-fill for transaction-amount is problematic.

@mraccess77
Copy link

mraccess77 commented May 9, 2025

I agree, transaction amount is not about the user and is more dangerous to be required as it could autofill.

@patrickhlauke
Copy link
Member Author

we (well, I) originally tried to remove transaction-amount and transaction-currency altogether from the list, but that proposal was voted down...so this tries to square the circle as a result...

@dbjorge
Copy link
Contributor

dbjorge commented May 12, 2025

Request to... provide a constructive example?

Wilco has offered several already in past discussions. For example, #3539 (review)

@bruce-usab
Copy link
Contributor

For example, #3539 (review)

How much money I donated to a gofundme, how much I bid on an auction, how much I tip, that's information about me. It is not identifying information like my name or an e-mail address is, but it is still about me. Not all currency fields are about me, not every field to enter a transaction amount is about a user, but when it's about a user's money it's about that user IMO.

Okay, for Understanding can we limit transaction-amount for situations where a user is returning to a specific website as opposed to across any/all websites (where something like email-address would be expected to auto populate?

@patrickhlauke
Copy link
Member Author

patrickhlauke commented May 16, 2025

auto-population (if it even happens) is a side effect that's orthogonal to the SC though

can we limit transaction-amount for situations where a user is returning to a specific website as opposed to across any/all websites

how would you specify this? and as an author, how would you do this (in HTML for instance)

@mbgower
Copy link
Contributor

mbgower commented May 22, 2025

@dbjorge

Wilco has offered several already in past discussions. For example, #3539 (review)

For the one you reference, commenters did not find it persuasive:

  • That is a very blurry line

  • An amount doesn't seem to fall into that category... I don't think transaction amount is something that is "about the user" and as such should not be part of what is required for input purpose.

  • I'm not sure I actually see this line that you're drawing.

  • Having transaction-amount blurs that line, and leaves it less clear

  • I do see a likelihood of harm from this: a user unknowingly submitting the wrong value. To me this outweighs what is an abstract discussion on future personalization uses.

Can you please point to one that got support? We're trying to find some kind of example which we can give that allows us to say, effectively, "ignore transaction-amount, except in circumstances such as this, for this reason".

@mbgower
Copy link
Contributor

mbgower commented May 22, 2025

@patrickhlauke

auto-population (if it even happens) is a side effect that's orthogonal to the SC though

That seems a little shaky . The understanding document talks about it quite a bit:

In addition to repurposing this taxonomy, when the autocomplete attribute technique is used to meet this Success Criterion, browsers and other user-agents can suggest and 'autofill' the right content by autocompleting these fields based on past user input stored in the browser. By defining more granular definitions of common input purposes, for example “Birthday” (autocomplete="bday"), browsers can store personalized values for each of these fields (the user's birthday date). The user is relieved of having to type the information and can instead confirm or, if needed, change the value of the field, a significant benefit for users with memory issues, dyslexia, and other disabilities

The only technique we have published for this is H98: Using HTML 5.2 autocomplete attributes

Perhaps we could add in guidance that we recommend that transaction-amount should be used cautiously, and that where it is used, include autocomplete="off"?

It would still be great to think of an example where there is demonstrable benefit.

@patrickhlauke
Copy link
Member Author

Perhaps we could add in guidance that we recommend that transaction-amount should be used cautiously, and that where it is used, include autocomplete="off"?

unless i'm misreading the HTML spec, you can't set off on the autocomplete for the form field itself if you also want to provide its purpose. so

<input type="number" autocomplete="transaction-amount off">

would be invalid (as it's "wearing the autofill expectation mantle").

you could set autocomplete="off" on the entire form, but that would seem a bit heavy-handed and counterproductive.

@patrickhlauke
Copy link
Member Author

That seems a little shaky . The understanding document talks about it quite a bit:

In addition to repurposing this taxonomy, when the autocomplete attribute technique is used to meet this Success Criterion, browsers and other user-agents can suggest and 'autofill' the right content by autocompleting these fields based on past user input stored in the browser.

It's still a side effect of the original ask of the SC, which is to programmatically identify purpose. It'd theoretically be just as valid to use some other form of standardised (or widely supported) metadata (like RDF or similar) ... you'd pass the SC's requirement, but won't get autofill behaviour in browsers...

Or, to put another way: if your browser fails to autocomplete somehow, it's not a failure of the SC. hence, the autocomplete/autofill behaviour you get when using autocomplete is more a side effect/lucky accident

(I'll save everybody my lengthy rant at the time about how this weird repurposing/piggybacking on one specific HTML attribute was perhaps not the best idea, and how the whole concept of "using technologies with support for identifying the expected meaning for form input data" was always a chicken-and-egg problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants