[jifty-devel] Re: [Jifty-commit] r1350 - in jifty/trunk: . lib/Jifty lib/Jifty/Web lib/Jifty/Web/Form/Field share/web/static/css share/web/templates/_elements

Alex Vandiver alexmv at bestpractical.com
Thu Jun 22 15:19:05 EDT 2006


On Thu, 2006-06-22 at 15:10 -0400, jifty-commit at lists.jifty.org wrote:
> Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
> ==============================================================================
> --- jifty/trunk/lib/Jifty/Web/Form/Field.pm	(original)
> +++ jifty/trunk/lib/Jifty/Web/Form/Field.pm	Thu Jun 22 15:10:15 2006
> @@ -375,9 +375,15 @@
>  
>  sub render_label {
>      my $self = shift;
> -    Jifty->web->out(
> +    if ( $self->render_mode eq 'update' ) {
> +        Jifty->web->out(
>  qq!<label class="label @{[$self->classes]}" for="@{[$self->element_id ]}">@{[_($self->label) ]}</label>\n!
> -    );
> +        );
> +    } else {
> +        Jifty->web->out(
> +            qq!<span class="label @{[$self->classes]}">@{[_($self->label) ]}</span>\n!
> +        );
> +    }
>  
>      return '';
>  }

This hunk breaks screen-readers and the like, which, for proper HTML
accessibility, need a <label> element.  What's the error that this was
trying to fix?
 - Alex



More information about the jifty-devel mailing list