Skip to content

Target attribute on a: consistency with HTML or with existing implementations? #526

Open

Description

@AmeliaBR

As discussed in Issue #315 and PR #409:

The href and target attributes on SVG <a> are inconsistent with their equivalents on HTML links, being exposed in the DOM as SVGAnimatedString objects instead of regular DOMString primitives.

href has a lot of usage & so is probably too much of a web compat risk to change. But @dstorey argued that usage is low enough) that consistency with HTML should win out.

This would be a change from all implementations, and potentially a breaking one.

We agreed on the telcon today to only make the change if we can get multiple implementers all committing to ship code at approximately the same time.

So:
@ewilligers @dstorey @longsonr @smfr
Is this worth making a change? Do you think that you can get that change through your codebase review, assuming commitments from the other browsers?

Note that in #175 we discussed making SVGAnimatedString more string-like with putForwards and stringifier properties (which would minimize but not eliminate the SVG vs HTML compat issues), but that also won't make it into SVG 2.0 unless we have clear implementer commitments.

Activity

  1. smfr commented on Aug 14, 2018

    @smfr

    if we can get multiple implementers all committing to ship code at approximately the same time

    That kind of thing never works. But I think it's a good change to make.

  2. dstorey commented on Aug 15, 2018

    @dstorey
    Member

    I've already started to implement the update in EdgeHTML but it didn't make it in time for our upcoming release.

  3. ewilligers commented on Aug 16, 2018

    @ewilligers
    Contributor

    The current usage of target is very low. If other browsers were making the change for consistency with HTML, I expect Blink would too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions