User tests: Successful: Unsuccessful:
Make calendar button usable in other css-frameworks
Edit:
Make calendar output usable in other css-frameworks
For testing instruction look at this comment
In BS3 the input-group can not handle the button tag, so it is now changed from a button tag before to an a tag.
Edit:
Other frameworks, such as Uikit, do not properly render the calendar design for active days. This PR fixes that.
Status | New | ⇒ | Pending |
Category | ⇒ | Layout JavaScript |
Same problem we will have with BS4 in J4, so why not makes the changes now?
Maybe someone better with accessibility (or frontend in general) can chime in here but it's not a good practice to misuse a <a>
element when you aim to represent a button on the page. So semantically the current markup structure is correct and I'd personally argue the frameworks should address the bugs in their code. Or, I could be totally wrong here and the change doesn't matter. But at first glance this doesn't seem like a correct change in terms of proper markup structure.
You are right, the change between <button>
and <a>
makes a difference for accessibility.
Can we still adopt the customizations in the JS and CSS?
The CSS and JS changes look fine to me at a quick glance without actually testing them (since the JS changes are just adding support for looking for an <a>
element as well as <button>
).
Labels |
Added:
?
|
so why not makes the changes now?
Well the calendar, as the rest of the fields in J4, will be custom elements #19427. So all I wanted to say is this code is going to be majorly deprecated in J4 (might stay as is in the legacy folder, although I really like to see this thing die)
Category | Layout JavaScript | ⇒ |
It looks quite like this. However, in my tests it was enough for .calendar-container table tbody td.today
to set the width
from 100%
to auto
.
In that case, I can close this PR.
Thanks to all.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-03-19 23:18:07 |
Closed_By | ⇒ | degobbis |
Title |
|
Status | Closed | ⇒ | New |
Closed_Date | 2018-03-19 23:18:07 | ⇒ | |
Closed_By | degobbis | ⇒ |
Status | New | ⇒ | Pending |
The other PR actually pretty much describes the problem. I had the same flawed output as shown in the pictures, with the UIkit framework from Yootheme.
Category | ⇒ | JavaScript Layout |
Category | JavaScript Layout | ⇒ |
Options -> Settings
in the theme style settings{jtf theme=calendar|framework=uikit}
Quite a lot of effort for customizing two CSS lines without a B/C break
Category | ⇒ | JavaScript Layout |
I have tested this item
Works good screenshots are following now.
I followed the test instructions in #19944 (comment). And my test was successful.
Before applying the patch the calendar in yootheme master2 uikit
After applying the patch the calendar in yootheme master2 uikit
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-03-25 14:59:01 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Category | JavaScript Layout | ⇒ |
I think the change in the JavaScript to support both
<a>
and<button>
is fine but semantically I think the default markup should stay as a<button>
and if you need to use an<a>
element you should override the layout.