I have a button that stops being a button on larger screens. Is removing events and role="presentation" enough?
garcialo
14:25
might want to remove it from the tab order as well?
garcialo
14:25
how does it stop being a button?
MichielBijl
14:25
tabindex=-1?
garcialo
14:25
That would work
MichielBijl @MichielBijl never tried that
garcialo
14:25
...and would be the way of doing it =p
MichielBijl
14:25
Never had to build something like this.
MichielBijl
14:25
Haha okay
MichielBijl
14:26
Uhm, well, it's an accordion type thing on mobile, but all expanded/not collapsible on desktop.
garcialo
14:26
tabindex="-1" also makes something able to be programatically or mousically focusable
garcialo
14:27
ah, gotcha
MichielBijl
14:31
It's a mess anyway. Wanted to implement it the WCAG way, but haven't gotten around to that. And wasn't quite sure how to get the switch done between default and larger screens.
MichielBijl
14:31
But that is another problem. If I can get styling done today, I have a full day to build in arrow key support.
MichielBijl
14:32
Should be enough :p
StommePoes
16:32
bleh, changing HTML to make everything a list item to get drag and drop working is a pain in IE
StommePoes
16:32
plus the markup just seems barfworthy
StommePoes
16:32
listception
MichielBijl
17:06
It needs be a list-item for it to function?
MichielBijl
17:06
role="list-item" :P
StommePoes
17:15
you can't just throw that on any element : )
MichielBijl
17:15
That was a joke…
StommePoes
17:15
Even so, I now can haz totally legit listitems, still not getting keystrokes passed on : (
StommePoes
17:18
it seems a silly restriction to have, but who knows, there might have been a good reason for it somewhere
StommePoes
17:19
can't legally drop a li anywhere but inside a list, which doesn't have a listitem role, it has a list role... when I'm focused on a list, then I don't get to pass on my keystrokes anymore, so can never drop the item. Le sigh
StommePoes
17:33
Okay, looks like role="application" is the only sane solution. Which is terrible.
garcialo
17:33
Stay safe, @StommePoes
MichielBijl
17:45
Can haz code sample @StommePoes ?
StommePoes
18:34
huh, answer stayed red and vanished when I refreshed
StommePoes
18:34
No I ended up breaking my code because nested lists seem to causes endless chain of triggered dragging events and now I need to throttle them cause they're making IE puke.