Convert links that are buttons to buttons

Bug #1918193 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Doris Tam

Bug Description

Why do we have some buttons as forms and some buttons as links? Would we ever be able to align them so it's one thing to rule over all to make theming easier and more consistent?

Revision history for this message
Evonne Cheung (evonne) wrote :

Example where this occurs is in forums, where you have links for New topic, Edit forum, then form for subscribe/unsubscribe, then link for Delete forum. Group buttons often use first-of-type or last-of-type to target the border-radius, but it gets throw out when it's a different type.

tags: added: front-end
removed: evonne
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
status: Triaged → In Progress
Revision history for this message
Doris Tam (doristam) wrote :

After an initial investigation, it is possible for links to be turned into pieforms!
However, links require little configuration so a Pieform isn't necessarily viable as it adds complexity.

Looking at the point of view of a designer, it would definitely make themeing more easier and consistent if buttons were consistently styled the same way.

This needs further some discussion.

Revision history for this message
Doris Tam (doristam) wrote :

After having discussed the options with Bob, Evonne, and Kristina, we have decided to investigate further.

First, locate where links and Pieform elements are together and the mix and matching pattern e.g. if the Pieform element is sitting in between links.

After gathering that data, investigate some options:

1. See if there is some CSS/bootstrap/magic that lets CSS know that they are siblings
2. Mess with the Pieform library to bring the child element to be visible
3. Try replacing the links with a button and Pieform elements with a generic wrapper to target using CSS

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11885

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/11893

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/11895

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/11919

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11919
Committed: https://git.mahara.org/mahara/mahara/commit/9adec81592802b4e09e9ac62bfe1ba015d8ef86d
Submitter: Gold (<email address hidden>)
Branch: master

commit 9adec81592802b4e09e9ac62bfe1ba015d8ef86d
Author: Doris Tam <email address hidden>
Date: Wed Aug 11 15:33:34 2021 +1200

Bug 1918193: Add a function to allow buttons to redirect

Please test on child patches by interacting with
links that have been coverted to buttons using the
'Enter' and 'Space' keys.

This function looks for the all the data-url attributes
in the page and sets that url to be used for the target
when (buttons) are interacted with.

This is especially needed as previously <a> tag href
attributes do not get overwritten by javascript
but data-url (js attributes do) so we need a way of
telling the page to find them again.

Change-Id: I20edecb98f9056f97af89db0f76f476ab8e902f3

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/11885
Committed: https://git.mahara.org/mahara/mahara/commit/5aa6d6d3e9c25272fcbba08bfe982c9aaea77a5b
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 5aa6d6d3e9c25272fcbba08bfe982c9aaea77a5b
Author: Doris Tam <email address hidden>
Date: Tue Aug 3 14:27:00 2021 +1200

Bug 1918193: Turning forum links into buttons

and update Behat tests to use the correct language for testing buttons
across all the changes

Change-Id: Id4aeff27dddb59c5a26735de08f0f0af770a7020

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/11895
Committed: https://git.mahara.org/mahara/mahara/commit/3aa7d8bd8666322eb60e498274dec3c79e020641
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 3aa7d8bd8666322eb60e498274dec3c79e020641
Author: Doris Tam <email address hidden>
Date: Wed Aug 4 17:09:24 2021 +1200

Bug 1918193: Convert links that are buttons to buttons

Change-Id: Iee8190563631af9558f6cd98715d5d144a81aed1

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: accessibility
summary: - Investigate buttons (forms and links)
+ Convert links that are buttons to buttons
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.