? ? Pending

User tests: Successful: Unsuccessful:

avatar crystalenka
crystalenka
22 Nov 2022

Splitting this out from my other PR #39269 so that these don't get grouped with possibly breaking changes.

Summary of Changes

The URL menu item type has a field called "Link Rel Attribute".

MDN has a list of valid link types. Google also has some search-engine specific ones.

I compared these with the available options in the menu item and added missing values.

For front end links:

  • me
  • external

For back end links:

  • me
  • external
  • noopener
  • sponsored
  • ugc

While I don't expect back end menu items to be available for indexing, there might be cases where this happens intentionally (a public menu available in the admin login screen?) so it doesn't hurt to include those values as options in the admin menu item as well.

Testing Instructions

Create a new menu item type of "URL".
Go to the "Link Type" tab.
Open the "link rel attribute" dropdown.

Actual result BEFORE applying this Pull Request

Missing options.

Expected result AFTER applying this Pull Request

Options available!

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Yes, documentation is needed because this field is missing altogether from the docs. However, after over an hour fighting with the docs site to register an account and figure out the syntax, and filling out arcane captchas, my suggested edit was blocked as spam. I will not spend more time on this because I am frustrated. If anyone else wants to try, here is what I tried to add on this page before the 'common options' heading:

<translate>
===Link Type Tab===
</translate>
<translate>
* '''Link Rel Attribute'''. The rel attribute specifies the relationship between the page you start on and the page the link directs you to. For an in-depth explanation of this attribute and what each option means, please reference the [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel MDN Documentation].
</translate>
avatar crystalenka crystalenka - open - 22 Nov 2022
avatar crystalenka crystalenka - change - 22 Nov 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2022
Category Administration com_menus
avatar ReLater
ReLater - comment - 22 Nov 2022

In terms of maintenance and usability in other extensions, wouldn't it be better to introduce a new form field in Joomla? RelAttributesField.php or something?

avatar crystalenka
crystalenka - comment - 22 Nov 2022

And do what with the input/data/current field? Wouldn't that be a bigger b/c break?

avatar crystalenka
crystalenka - comment - 22 Nov 2022

Not against it, just seeking to understand. :)

avatar crystalenka
crystalenka - comment - 22 Nov 2022

Also can we keep the discussion about multiple rel attributes to the other PR? This one just adds the missing options without changing the field at all

avatar crystalenka crystalenka - change - 22 Nov 2022
The description was changed
avatar crystalenka crystalenka - change - 22 Nov 2022
The description was changed
avatar crystalenka crystalenka - edited - 22 Nov 2022
avatar crystalenka crystalenka - edited - 22 Nov 2022
avatar obuisard
obuisard - comment - 13 Jan 2023

Roland @roland-d do you want to move this one to 4.3?

avatar roland-d
roland-d - comment - 14 Jan 2023

@obuisard This is fine for 4.2 just needs some tests.

avatar Quy Quy - test_item - 15 Jan 2023 - Tested successfully
avatar Quy
Quy - comment - 15 Jan 2023

I have tested this item successfully on 17dc81c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39275.

avatar viocassel viocassel - test_item - 21 Jan 2023 - Tested successfully
avatar viocassel
viocassel - comment - 21 Jan 2023

I have tested this item successfully on 17dc81c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39275.

avatar Quy Quy - change - 21 Jan 2023
Status Pending Ready to Commit
Labels Added: ?
avatar Quy
Quy - comment - 21 Jan 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39275.

avatar fancyFranci fancyFranci - close - 22 Jan 2023
avatar fancyFranci fancyFranci - merge - 22 Jan 2023
avatar fancyFranci fancyFranci - change - 22 Jan 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-01-22 11:28:02
Closed_By fancyFranci
Labels Added: ?
avatar fancyFranci
fancyFranci - comment - 22 Jan 2023

Thank you! Nice to see that the options are matching the specifications now.

Add a Comment

Login with GitHub to post a comment