Skip to content

Add horizontal padding to set info icon.#2946

Open
somiaj wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
somiaj:modify-info-set-desc
Open

Add horizontal padding to set info icon.#2946
somiaj wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
somiaj:modify-info-set-desc

Conversation

@somiaj
Copy link
Copy Markdown
Contributor

@somiaj somiaj commented Apr 9, 2026

This adds some spacing between the set link and the info icon to make it accessible on small touch screens to give enough space to touch the icon without hitting the link instead.

somiaj added a commit to somiaj/webwork2 that referenced this pull request Apr 9, 2026
The set description is available on the ProblemSet page, and no
longer needs to be a tooltip on the ProblemSets page. This removes
the icon complete.

This is an alternative to openwebwork#2946 instead of trying to make the
tooltip accessible and available on touchscreens, just remove it
in favor of showing it only on the ProblemSet page.
@somiaj
Copy link
Copy Markdown
Contributor Author

somiaj commented Apr 9, 2026

Added #2947 as an alternative to this approach and remove the set icon altogether. I'll let approvals vote for which approach others prefer.

Copy link
Copy Markdown
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding tabindex="-1" is certainly incorrect. At least in my testing with Gnome Orca that makes the set description completely inaccessible with the screen reader and only keyboard controls.

To be quite frank, I think that this should be reverted to the way it was with the tooltip on the set id link. Yes, it does make the tooltip practically inaccessible for mobile devices, but for all other cases it works well.

My vote is for neither of pull requests #2946 or #2947, and to put this back to the way it was and has been for a long time. The set description is now on the problem set page for mobile devices.

=%>
% if ($set->description =~ /\S/) {
<a class="set-id-tooltip" role="button" tabindex="0" data-bs-placement="right"
<a class="p-1 set-id-tooltip" role="button" tabindex="-1" data-bs-placement="right"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use px-1 instead of p-1. There is no need for vertical padding here. Only horizontal padding is needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I debated between p-1, ps-1, and px-1, and thought the extra padding didn't affect the layout of the page in a noticeable way, but made the button slightly bigger vertically to make it easier to click on a small phone. I will update as suggested, just explaining my thought process.

@drgrice1
Copy link
Copy Markdown
Member

Actually I think this pull request is the one to go with, but with it only adding px-1 and leaving tabindex="0".

In thinking about it more, I kind of like that the icon makes it clear that there is more information.

Also, testing with Gnome Orca, it isn't even reading the tooltips when they are on the links. Although, I suspect that is some issue with Gnome orca and that the proprietary screen readers would.

This adds some spacing between the set link and the info icon to
make it accessible on small touch screens to give enough space to
touch the icon without hitting the link instead.
@somiaj somiaj force-pushed the modify-info-set-desc branch from 5db2c15 to 16fbf22 Compare April 10, 2026 00:09
@somiaj somiaj changed the title Remove set info icon from tab order. Add horizontal padding to set info icon. Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants