User tests: Successful: Unsuccessful:
Splitting this out from my other PR #39269 so that these don't get grouped with possibly breaking 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.
Create a new menu item type of "URL".
Go to the "Link Type" tab.
Open the "link rel attribute" dropdown.
Missing options.
Options available!
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>
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_menus |
And do what with the input/data/current field? Wouldn't that be a bigger b/c break?
Not against it, just seeking to understand. :)
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
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC
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:
?
|
Thank you! Nice to see that the options are matching the specifications now.
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?