-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
improve invoice pages for accessibility testing #5452
base: master
Are you sure you want to change the base?
Changes from 5 commits
6cd157a
2c4e035
4085304
b143851
15093f5
dec8208
24e34da
4506269
5e3f32c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,12 @@ | |
@await Component.InvokeAsync("UiExtensionPoint", new {location = "checkout-v2-bitcoin-pre-content", model = Model}) | ||
<div class="payment-box"> | ||
<div v-if="model.invoiceBitcoinUrlQR" class="qr-container" :data-qr-value="model.invoiceBitcoinUrlQR" :data-clipboard="model.btcAddress"> | ||
<div> | ||
<div role="img" aria-label="Bitcoin QR Code"> | ||
<qrcode :value="model.invoiceBitcoinUrlQR" tag="div" :options="qrOptions" /> | ||
</div> | ||
<img class="qr-icon" :src="model.cryptoImage" :alt="model.paymentMethodName"/> | ||
<img class="qr-icon" :src="model.cryptoImage" :alt="model.paymentMethodName" /> | ||
</div> | ||
|
||
<div v-if="model.btcAddress" class="input-group mt-3"> | ||
<div class="form-floating" id="[email protected]"> | ||
<vc:truncate-center text="model.btcAddress" is-vue="true" padding="15" elastic="true" classes="form-control-plaintext" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,19 +211,24 @@ | |
<h3 class="mb-3">General Information</h3> | ||
<table class="table mb-0"> | ||
<tr> | ||
<th>Store</th> | ||
<th scope="row">Store</th> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does defining the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally, I know that defining scope makes it easier for screen readers to understand the relationship between the header and the subsequent data, thereby creating a more structure description when being read. Felt it can come in handy here since we are dealing with accessibility testing. |
||
<td> | ||
<a href="@Model.StoreLink" rel="noreferrer noopener">@Model.StoreName</a> | ||
</td> | ||
</tr> | ||
@* <tr> | ||
<th>Invoice Number</th> | ||
<td>@Model.Id</td> | ||
</tr> *@ | ||
<tr> | ||
<th>Invoice Id</th> | ||
<th scope="row">Invoice Id</th> | ||
<td>@Model.Id</td> | ||
</tr> | ||
|
||
@if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderId)) | ||
{ | ||
<tr> | ||
<th>Order Id</th> | ||
<th scope="row">Order Id</th> | ||
<td> | ||
@if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderUrl)) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,13 +105,17 @@ | |
<span class="text-nowrap">@Model.LastRefreshed.ToString("g")</span> | ||
</div> | ||
<div class="d-flex align-items-center only-for-js gap-3 my-3"> | ||
<button type="button" class="btn btn-link fw-semibold d-print-none p-0" id="copyLink"> | ||
<button type="button" class="btn btn-link fw-semibold d-print-none p-0" id="copyLink" aria-label="Copy Link"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why these instances need an extra label, when the element content is just that text. |
||
Copy Link | ||
</button> | ||
<button type="button" class="btn btn-link fw-semibold d-print-none p-0" page-qr> | ||
<span class="fa fa-qrcode"></span> Show QR | ||
<button type="button" class="btn btn-link fw-semibold d-print-none p-0" page-qr aria-label="Show QR Code"> | ||
<span class="fa fa-qrcode" aria-hidden="true"></span> | ||
<span class="visually-hidden">Show QR Code</span> | ||
</button> | ||
</div> | ||
|
||
|
||
|
||
@if (!string.IsNullOrEmpty(Model.ResetIn)) | ||
{ | ||
<p> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
"payment_received": "Payment Received", | ||
"payment_received_body": "Your payment has been received and is now processing.", | ||
"payment_received_confirmations": "Once your payment has received {{requiredConfirmations}} confirmations on the {{cryptoCode}} blockchain, your invoice will be settled.", | ||
"invoice_paid": "Invoice Paid", | ||
"invoice_paid": "Invoice Paid Successfully", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't change those texts and say they are clear enough. Otherwise we'd have to adapt many more places. |
||
"invoice_expired": "Invoice Expired", | ||
"invoice_expired_body": "An invoice is only valid for {{minutes}} minutes.\n\nReturn to {{storeName}} if you would like to resubmit a payment.", | ||
"invoice_paidpartial_body": "An invoice is only valid for {{minutes}} minutes.\n\nThis invoice expired with partial payment. Please contact us, so that we can fulfill your order.", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
aria-label
would need to be:aria-label="$t('view_receipt')"
to have it translated as well, but I'm not sure if or why we have to repeat the element content here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Would update.