-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: Delete freshly created recent Check-ins #12879
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
Changes from all commits
4fa2a1c
582fd59
0adba16
251a3e2
0d5e35c
d40df64
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 |
|---|---|---|
| @@ -1,3 +1,79 @@ | ||
| /** | ||
| * HTML fixture for the CheckInComponents container element. | ||
| * Mirrors the structure expected by the CheckInComponents constructor. | ||
| */ | ||
| export const checkInContainer = ` | ||
| <div class="check-in-container" data-config='{"workOlid":"OL123W","editionKey":"/books/OL456M","lastReadDate":"","eventId":null,"i18n":{"failedSubmitCheckIn":"Failed to submit","failedDeleteCheckIn":"Failed to delete"}}'> | ||
| <div class="check-in-prompt"> | ||
| <a class="prompt-current-year" href="javascript:;">This year</a> | ||
| <a class="prompt-today" href="javascript:;">Today</a> | ||
| </div> | ||
| <div class="last-read-date hidden"> | ||
| <span class="check-in-date"></span> | ||
| </div> | ||
| </div> | ||
| `; | ||
|
|
||
| /** | ||
| * HTML fixture for the check-in form modal template. | ||
| * Must be present in the DOM with id="check-in-form-modal" so that | ||
| * CheckInComponents.createModalContentFromTemplate() can clone it. | ||
| */ | ||
| export const checkInFormModal = ` | ||
| <div id="check-in-form-modal"> | ||
| <form class="check-in__form" action=""> | ||
| <input type="hidden" name="event_type" value="3"> | ||
| <input type="hidden" name="event_id" value=""> | ||
| <input type="hidden" name="edition_key" value=""> | ||
| <div class="check-in__inputs"> | ||
| <label class="check-in__year-label">Year:</label> | ||
| <select class="check-in__select" name="year"> | ||
|
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. WCAG 4.1.2: Form element has no accessible label. Form elements must have labels. Use Detailsname: "year" Every form input needs an accessible label so users understand what information to enter. Use a 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. WCAG 4.1.2: Form element has no accessible label. Form elements must have labels. Use Detailsname: "year" Every form input needs an accessible label so users understand what information to enter. Use a 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. WCAG 4.1.2: Form element has no accessible label. Form elements must have labels. Use Detailsname: "year" Every form input needs an accessible label so users understand what information to enter. Use a |
||
| <option value="">Year</option> | ||
| <option class="hidden show-if-local-year" value="2025">2025</option> | ||
| <option value="2024">2024</option> | ||
| <option value="2023">2023</option> | ||
| </select> | ||
| <label class="check-in__month-label">Month:</label> | ||
| <select class="check-in__select" name="month" disabled> | ||
| <option value="">Month</option> | ||
| <option value="1">January</option> | ||
| <option value="2">February</option> | ||
| <option value="3">March</option> | ||
| <option value="4">April</option> | ||
| <option value="5">May</option> | ||
| <option value="6">June</option> | ||
| <option value="7">July</option> | ||
| <option value="8">August</option> | ||
| <option value="9">September</option> | ||
| <option value="10">October</option> | ||
| <option value="11">November</option> | ||
| <option value="12">December</option> | ||
| </select> | ||
| <label class="check-in__day-label">Day:</label> | ||
| <select class="check-in__select" name="day" disabled> | ||
| <option value="">Day</option> | ||
| <option value="1">1</option><option value="2">2</option><option value="3">3</option> | ||
| <option value="4">4</option><option value="5">5</option><option value="6">6</option> | ||
| <option value="7">7</option><option value="8">8</option><option value="9">9</option> | ||
| <option value="10">10</option><option value="11">11</option><option value="12">12</option> | ||
| <option value="13">13</option><option value="14">14</option><option value="15">15</option> | ||
| <option value="16">16</option><option value="17">17</option><option value="18">18</option> | ||
| <option value="19">19</option><option value="20">20</option><option value="21">21</option> | ||
| <option value="22">22</option><option value="23">23</option><option value="24">24</option> | ||
| <option value="25">25</option><option value="26">26</option><option value="27">27</option> | ||
| <option value="28">28</option><option value="29">29</option><option value="30">30</option> | ||
| <option value="31">31</option> | ||
| </select> | ||
| <a class="check-in__today" href="javascript:;">Today</a> | ||
| </div> | ||
| <span class="check-in__actions"> | ||
| <button class="check-in__delete-btn cta-btn cta-btn--delete invisible">Delete Event</button> | ||
| <button type="submit" class="check-in__submit-btn cta-btn cta-btn--shell" disabled>Submit</button> | ||
| </span> | ||
| </form> | ||
| </div> | ||
| `; | ||
|
|
||
| export const checkInForm = ` | ||
| <div class="check-in"> | ||
| <form class="check-in__form" action=""> | ||
|
|
||
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.
WCAG 4.1.2: Form element has no accessible label.
Form elements must have labels. Use
<label>, aria-label, or aria-labelledby.Details
name: "year"
Every form input needs an accessible label so users understand what information to enter. Use a
<label>element with a for attribute matching the input's id, wrap the input in a<label>, or use aria-label/aria-labelledby for custom components. Placeholders are not sufficient as labels since they disappear when typing.