Added disabled mode and size attribute handling