-
Notifications
You must be signed in to change notification settings - Fork 18
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
Changed markup when using optgroup element #42
Conversation
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.
Some suggestions, let me know what you think. Also as mentioned elsewhere we'll need to make the up/down changes here (in e.g. the upDown function).
@dracos Thanks for the feedback =), sorry I had a couple of extras from an experiment I was doing a couple of weeks ago. I added some fixups, that fixed all the issues above. I tried to make the up and down keys to work when using fieldset, but it didn't work at the end. |
d33d8a7
to
adb5774
Compare
@lucascumsille I've pushed a commit that hopefully gets up/down working as before if you'd like to take a look. I've also fixed the tests. |
@dracos That's perfect is working for me. I tried it on Voiceover, and it works slightly different than the one we used to have, where on each option it would read = "Group title + option name" Example "Flavour Vanilla", now it gives the name of the group when you are in the first option of the group, which is exactly what happens with GOVUK and by default. If we wanted to keep the current behaviour we could include an Let me know what you think, otherwise I can just merge to master. |
I think going with the default fieldset behaviour is probably more consistent, yeah - the category list on FMS map filter can be quite long, but OTOH will have a few fieldsets in it, but hopefully will be clear. |
@dracos Sounds good, let's keep it like that. Should I merge it master? |
yeah, go for it, up to you if you want to merge the two commits as one or keep it as it is |
Instead of using the pseudo element to display the title of a optgroup, now they will be wrapped on a fieldset with a legend. The legend will have the text from the label attribute from the optgroup. It's also possible to change the class names for the fielset and legend, by using these settings: menuFieldsetHTML and menuFieldsetLegendHTML. Adapt up/down code to work with fieldsets.
adb5774
to
8b35fcd
Compare
Instead of using the pseudo element to display the title of a optgroup, now they will be wrapped on a fieldset with a legend. The legend will have the text from the label atrribute from the optgroup.
It's also possible to change the class names for the fieldset and legend, by using these settings: menuFieldsetHTML and menuFieldsetLegendHTML.