#41603 closed defect (bug) (fixed)
Custom date format field too small on mobile
Reported by: | desrosj | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Date/Time | Keywords: | dev-reviewed has-patch commit |
Focuses: | ui, administration | Cc: |
Description
On Settings > General, there is a field for entering a custom PHP date format string. This field is too small on mobile. The date preview is also broken up into two lines.
In #34539, the narrow field issue was addressed in other locations. Increasing the max-width
here (it has its own CSS definition) does not necessarily fix the problem for this field.
The preview changes every time the option is changed, but it is displayed next to the custom option. If we move the preview to its own line, it fixes the issue of the preview being split up, and allows the field to be widened quite a bit.
Attachments (5)
Change History (25)
#2
@
7 years ago
@afercia Thanks for clarifying! I forgot to mention that this change was for all orientations. I also was not sure if there are a11y benefits to putting the preview at the top as opposed to the bottom, or if there are any tags that we should use other than <span>
for something like this. Would a <label>
be beneficial?
#3
@
7 years ago
@desrosj thanks! Hm, no I think that text doesn't need a label and it's fine it's to the bottom. FWIW the settings pages would be greatly improved for accessibility and that's one of the goals of the Settings API project (just an experiment for now, nothing official).
#4
@
7 years ago
- Component changed from General to Date/Time
- Focuses administration added
- Milestone changed from Awaiting Review to 4.9
Let's handle this along with #34539.
This ticket was mentioned in Slack in #accessibility by timothybjacobs. View the logs.
7 years ago
#9
@
7 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Spinner is no more working for me
#10
@
7 years ago
There was also some discussion on slack:
https://wordpress.slack.com/archives/C02RP4X03/p1510153717000397
#11
@
7 years ago
- Keywords needs-patch added; has-patch removed
- Version set to trunk
The JS part to update the preview and display the spinner looks for a sibling
element with class .example
:
.siblings( '.example' )
This change introduces a paragraph so the example is not a sibling any longer and the JS part fails.
#12
@
7 years ago
- Keywords has-patch added; needs-patch removed
41603.2.diff updates the jQuery selectors used in the JS part to make the preview and spinner work again.
This ticket was mentioned in Slack in #core-committers by melchoyce. View the logs.
7 years ago
#16
@
7 years ago
- Keywords commit added
That chaining is getting a little out of control but patch looks good to me. :)
To clarify: the bold text "Preview:" would be visible also on large screens. Not that I'm opposed to that :) a11y-wise, visible text is always better then visually hidden one. Just thought was something to clarify.